[osg-users] [build] How do I add libraries to all linker commands?

Lucasw wsacul at gmail.com
Tue Mar 31 14:07:04 PDT 2009


Philip Lowman wrote:
> On Sat, Mar 28, 2009 at 11:24 AM, Lucasw < ()> wrote:
> 
> >  This is compiling OSG 2.8.0 and examples with the cmake generated files under cygwin, using standard gnu tools.  I think there's a master file somewhere with LIBS or LDFLAGS or equivalent that gets passed to all the makefiles to which I need to add -lGL and -lGLU (otherwise there are lots of 'undefined reference to `_glAlphaFunc'' and similar errors).  I did this manually for the main osg library, cutting and pasting the output of make VERBOSE=1 and adding those libs, but now there are dozens of examples and the manual method is too slow.
>  
> From your build tree type "make edit_cache", this is the same as running "ccmake /path/to/source/tree".
> 
> Check the contents of the OPENGL_gl_LIBRARY and OPENGL_glu_LIBRARY variables.  They should be pointed to the libraries you want to use for GL and GLU.  They are under the Advanced section of the cache.
> 
> 
> 
> -- 
> Philip Lowman
> 
>  ------------------
> Post generated by Mail2Forum



Okay, after running make edit_cache 't' has to be pressed to get the advanced mode where the OPENGL variables are, and then I added /usr/lib/libGL.dll.a and /usr/lib/libGLU.dll.a to those variables (separated from the /usr/lib/w32api libs by semicolons).  Then 'c' for configure and 'g' for generate, and then it exits and everything builds fine.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=9516#9516








More information about the osg-users mailing list