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

Lucasw wsacul at gmail.com
Sat Mar 28 08:24:31 PDT 2009

robertosfield wrote:
> Hi Lucas,
> On Fri, Mar 27, 2009 at 11:38 PM, Lucasw < ()> wrote:
> >  I need to put a -lGL and -lGLU in every linker command, what file do I edit in order to do this automatically?
> > 
> There is a whole load of unkowns embedded in this email - so guessing what they are and what advice to give is impossible.
> What unkowns???  Well lets start with what compilation are you talking about?  Compiling the OSG itself?  Compiling an OSG example? Compiling a 3rd party applications?
> Also what OS and dev tools are you using?
> Also what build tools are you using??
> Robert.
>  ------------------
> Post generated by Mail2Forum

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.


Read this topic online here:

More information about the osg-users mailing list