OpenGL and GLX

Zbynek Winkler zwin@users.sourceforge.net
Wed Nov 12 18:04:00 GMT 2003


Alexander Gottwald wrote:

>On Wed, 12 Nov 2003, Zbynek Winkler wrote:
>  
>
>>It seems the linker is not using the libraries at all :-(.
>>Zbynek
>>
>>$ g++ -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lGL -Wl,-t 
>>glxsample.cpp -o glxsample
>>    
>>
>
>reorder the arguments:
>
>$ g++ glxsample.cpp -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lGL -o glxsample
>  
>
Thanks. That actually works! Would you have a hint as to why the order 
is important?
Also would you know how to fix this command that shows the same symptoms?

c++  -g -g -O2  -o gazebo -L. -L/usr/X11R6/lib -L../libgazebo main.o 
World.o WorldFile.o Model.o ModelFactory.o Sensor.o SensorFactory.o 
X11Window.o WindowManager.o Camera.o ContactParams.o -lX11 -lm -lpthread 
-lGLU -lGL -L/usr/lib -lxml2 -lz -liconv -lm 
-L/home/zbynek/playerstage/ode-0.039/lib -lode  
models/SimpleSolid/libsimplesolid.a models/Pioneer2AT/libpioneer2at.a 
models/Pioneer2DX/libpioneer2dx.a models/SegwayRMP/libsegwayrmp.a 
models/SickLMS200/libsicklms200.a  
models/UserX11GLCamera/libuserx11glcamera.a 
models/GroundPlane/libgroundplane.a models/SonyVID30/libsonyvid30.a 
models/ClodBuster/libclodbuster.a 
sensors/X11GLCameraSensor/libx11glcamerasensor.a -lgazebo 
bodies/libbodies.a ../replace/libreplace.a ../toolkit/libtoolkit.a

Well not exactly the same. Adding -Wl,-t shows that is is using 
/usr/X11R6/lib/libGLU.dll.a and /usr/X11R6/lib/libGL.dll.a but somehow 
it is missing functions like glMultMatrixf, glVertex3f etc. It also 
returns bunch of warnings like
Warning: resolving _glMaterialf@12 by linking to _glMaterialf

Thank you for any insights you might have.
Zbynek

-- 
<zw at matfyz.cz>
http://zw.matfyz.cz/     http://robotika.cz/
Faculty of Mathematics and Physics, Charles University, Prague, Czech Republic




More information about the Cygwin-xfree mailing list