FLTK logo

[fltk/fltk] libglew issues on Windows builds with mingw / cmake (#226)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.issues  ]
 
Previous Message ]New Message | Reply ]Next Message ]

[fltk/fltk] libglew issues on Windows builds with mingw / cmake (#226) Ian M Apr 29, 2021  
 

During the 1.3.6 rc testing, I attempted to enable GLEW support in the cmake build.
NOTE: I believe that our cmake configuration uses pkg-config to determine libglew support, and my mingw testing environments do not have a working pkg-config, so I expected this to fail at configure time.
However, in fact this did not fail until link time, when the 2 OGL3 samples in the examples folder failed.

First off, the build failed because, when linking the GLEW examples, it could not locate libGLEW.a. The GLEW lib on mingw* is called libglew32.a (for both 32 or 64-bit builds) however, so it looks like we have asked for "the wrong" lib name at this point.
I made a copy of libglew32.a to libGLEW.a and the build then found and linked the lib in OK.
However, the link then failed for want of libopengl32.a in the link command.
For the "normal" OpenGL examples, we do link "-lopengl32" correctly so this behaviour is peculiar to the GLEW targets.
I tweaked the libs to ensure "-lopengl32" was incorporated and thereafter the two GLEW examples built and ran correctly.

I assume these issues arise because I do not have a working pkg-config in my mingw environments, but thought I'd record the issue here just as a record.

Effect observed on both fltk-1.3 and fltk-1.4 branches.
Builds performed on Win10, using mingw32 / Msys for 32-bit builds and TDM-gcc / Msys for 64-bit builds. Results were "the same" on both build environments.
(With the build "adjusted" manually, the samples build and run correctly.)


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.