Re: [osg-users] [build] How do I add libraries to all linker commands?
lucasw wrote: > > Philip Lowman wrote: > > On Tue, Mar 31, 2009 at 5:07 PM, Lucasw < ()> wrote: > > > > > > > > > > > > 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. > > > > > > > > > > > > > > > > > I ended up reinstalling cygwin, and now cmake does everything correctly > > > without edit files, and the linking works fine. The built examples also > > > work, or at least the couple I've spot-checked. > > > > > > > > > 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. > > > > Strange. On my Cygwin install with CMake 2.6.2 (on Cygwin) I get: > > > > OPENGL_INCLUDE_DIR /usr/include/w32api > > OPENGL_gl_LIBRARY /usr/lib/w32api/libopengl32.a > > OPENGL_glu_LIBRARY /usr/lib/w32api/libglu32.a > > > > What is the difference between /usr/lib/libGL.dll.a and > > /usr/lib/w32api/libopengl32.a? What version of CMake are you using? > > > > > > > > -- > > Philip Lowman > > > > -- > > Post generated by Mail2Forum > > > > I have cmake version 2.6-patch 2 > > That's what the default settings were, but when I tried to build with them I > get a bunch of errors like: > > > CMakeFiles/osg.dir/AlphaFunc.o:AlphaFunc.cpp:(.text+0x14): undefined > reference to `_glAlphaFunc' > CMakeFiles/osg.dir/BlendColor.o:BlendColor.cpp:(.text+0x159): undefined > reference to `_glGetString' > CMakeFiles/osg.dir/BlendColor.o:BlendColor.cpp: > > > So I looked for those functions in the libs on my system and found them in > libGL and libGLU, so I added those to cmake with the instructions above. So > it built fine, but now when I attempt to run an example I get: > > > Error: OpenGL version test failed, requires valid graphics context. > Error: glCreateShader not supported by OpenGL driver > Error: glShaderSource not supported by OpenGL driver > Error: glCompileShader not supported by OpenGL driver > Error: glGetShaderiv not supported by OpenGL driver > VERTEX glCompileShader "" FAILED > > > > So that may have not been the right thing to do. Does yours link okay > without libGL and libGLU? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=9586#9586 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] How do I add libraries to all linker commands?
Philip Lowman wrote: > On Tue, Mar 31, 2009 at 5:07 PM, Lucasw < ()> wrote: > > > > > > > > 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. > > > > > > > > > > > > > > > > > > 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. > > Strange. On my Cygwin install with CMake 2.6.2 (on Cygwin) I get: > > OPENGL_INCLUDE_DIR /usr/include/w32api > OPENGL_gl_LIBRARY /usr/lib/w32api/libopengl32.a > OPENGL_glu_LIBRARY /usr/lib/w32api/libglu32.a > > What is the difference between /usr/lib/libGL.dll.a and > /usr/lib/w32api/libopengl32.a? What version of CMake are you using? > > > > -- > Philip Lowman > > -- > Post generated by Mail2Forum I have cmake version 2.6-patch 2 That's what the default settings were, but when I tried to build with them I get a bunch of errors like: CMakeFiles/osg.dir/AlphaFunc.o:AlphaFunc.cpp:(.text+0x14): undefined reference to `_glAlphaFunc' CMakeFiles/osg.dir/BlendColor.o:BlendColor.cpp:(.text+0x159): undefined reference to `_glGetString' CMakeFiles/osg.dir/BlendColor.o:BlendColor.cpp: So I looked for those functions in the libs on my system and found them in libGL and libGLU, so I added those to cmake with the instructions above. So it built fine, but now when I attempt to run an example I get: Error: OpenGL version test failed, requires valid graphics context. Error: glCreateShader not supported by OpenGL driver Error: glShaderSource not supported by OpenGL driver Error: glCompileShader not supported by OpenGL driver Error: glGetShaderiv not supported by OpenGL driver VERTEX glCompileShader "" FAILED So that may have not been the right thing to do. Does yours link okay without libGL and libGLU? -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=9549#9549 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] How do I add libraries to all linker commands?
On Tue, Mar 31, 2009 at 5:07 PM, Lucasw wrote: > > > 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. > > > > 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. Strange. On my Cygwin install with CMake 2.6.2 (on Cygwin) I get: OPENGL_INCLUDE_DIR /usr/include/w32api OPENGL_gl_LIBRARY /usr/lib/w32api/libopengl32.a OPENGL_glu_LIBRARY /usr/lib/w32api/libglu32.a What is the difference between /usr/lib/libGL.dll.a and /usr/lib/w32api/libopengl32.a? What version of CMake are you using? -- Philip Lowman ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] How do I add libraries to all linker commands?
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 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] How do I add libraries to all linker commands?
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 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] How do I add libraries to all linker commands?
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. -Lucas -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=9399#9399 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] [build] How do I add libraries to all linker commands?
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. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] [build] How do I add libraries to all linker commands?
I need to put a -lGL and -lGLU in every linker command, what file do I edit in order to do this automatically? Thanks- Lucas -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=9376#9376 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org