This is the mail archive of the
cygwin
mailing list for the Cygwin project.
OpenGL linker error
- From: "Ritter, Nils" <Nils dot Ritter at medizin dot uni-leipzig dot de>
- To: <cygwin at cygwin dot com>
- Date: Tue, 6 Feb 2007 20:17:25 +0100
- Subject: OpenGL linker error
Hello,
we try to compile a cutting software named Salmon with Cygwin. All the source code files compile to .o object files. But when the linker try to build the binary, there're many openGL errors.
This is the command:
g++ -o out-glut/salmon out-glut/adjacency.o out-glut/assemble-matrix.o out-glut/big-vector.o out-glut/bounding.o ... lots of object files ... out-glut/wx-salmon.o -lXi -lXt -lICE -lXext -lXmu -lSM -lX11 -L/usr/X11R6/lib -L/lib/w32api -lglut -lopengl32 -lm
This procudes lots of errors:
out-glut/closest-vertex-selector-visualization.o: In function `_ZNSt23_Rb_tree_const_iteratorISt4pairIK7SimplexP17Edge_i
ntersectionEEC1EPKSt13_Rb_tree_nodeIS5_E':
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_tree.h:239: undefined reference to `_glPointSize'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_tree.h:239: undefined reference to `_glBegin'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_tree.h:239: undefined reference to `_glColor4f'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_tree.h:239: undefined reference to `_glVertex3dv'
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/bits/stl_tree.h:239: undefined reference to `_glEnd'
out-glut/fem-drawer.o: In function `_ZN10Fem_drawer12set_frustrumEv':
/salmon/salmon-0.1/fem-drawer.cc:170: undefined reference to `_glMatrixMode'
/salmon/salmon-0.1/fem-drawer.cc:171: undefined reference to `_glLoadIdentity'
/salmon/salmon-0.1/fem-drawer.cc:174: undefined reference to `_gluPerspective'
out-glut/fem-drawer.o: In function `_ZN10Fem_drawer10set_cameraEi':
/salmon/salmon-0.1/fem-drawer.cc:193: undefined reference to `_glMatrixMode'
/salmon/salmon-0.1/fem-drawer.cc:197: undefined reference to `_glLoadIdentity'
/salmon/salmon-0.1/fem-drawer.cc:200: undefined reference to `_glTranslated'
/salmon/salmon-0.1/fem-drawer.cc:203: undefined reference to `_glRotated'
/salmon/salmon-0.1/fem-drawer.cc:206: undefined reference to `_glMultMatrixf'
/salmon/salmon-0.1/fem-drawer.cc:210: undefined reference to `_glTranslated'
out-glut/fem-drawer.o: In function `_ZN10Fem_drawer12draw_featureEv':
/salmon/salmon-0.1/fem-drawer.cc:248: undefined reference to `_glPointSize'
/salmon/salmon-0.1/fem-drawer.cc:249: undefined reference to `_glBegin'
/salmon/salmon-0.1/fem-drawer.cc:251: undefined reference to `_glEnd'
out-glut/fem-drawer.o: In function `_ZN10Fem_drawer5setupEv':
/salmon/salmon-0.1/fem-drawer.cc:265: undefined reference to `_glClear'
/salmon/salmon-0.1/fem-drawer.cc:266: undefined reference to `_glDisable'
/salmon/salmon-0.1/fem-drawer.cc:267: undefined reference to `_glEnable'
/salmon/salmon-0.1/fem-drawer.cc:268: undefined reference to `_glBlendFunc'
/salmon/salmon-0.1/fem-drawer.cc:269: undefined reference to `_glClearColor'
/salmon/salmon-0.1/fem-drawer.cc:270: undefined reference to `_glFlush'
out-glut/fem-drawer.o: In function `_ZN10Fem_drawer13draw_triangleEP8Triangleb':
/salmon/salmon-0.1/fem-drawer.cc:284: undefined reference to `_glBegin'
/salmon/salmon-0.1/fem-drawer.cc:286: undefined reference to `_glBegin'
/salmon/salmon-0.1/fem-drawer.cc:315: undefined reference to `_glNormal3dv'
/salmon/salmon-0.1/fem-drawer.cc:322: undefined reference to `_glNormal3dv'
/salmon/salmon-0.1/fem-drawer.cc:326: undefined reference to `_glEnd'
/salmon/salmon-0.1/fem-drawer.cc:335: undefined reference to `_glBegin'
/salmon/salmon-0.1/fem-drawer.cc:339: undefined reference to `_glEnd'
out-glut/fem-drawer.o: In function `_ZN10Fem_drawer12enter_vertexE7Vector3':
/salmon/salmon-0.1/fem-drawer.cc:347: undefined reference to `_glVertex3dv'
out-glut/fem-drawer.o: In function `_ZN10Fem_drawer4drawEv':
/salmon/salmon-0.1/fem-drawer.cc:384: undefined reference to `_glDrawBuffer'
out-glut/fem-drawer.o: In function `_ZN10Fem_drawer10draw_frameEv':
/salmon/salmon-0.1/fem-drawer.cc:398: undefined reference to `_glClear'
/salmon/salmon-0.1/fem-drawer.cc:399: undefined reference to `_glClear'
/salmon/salmon-0.1/fem-drawer.cc:411: undefined reference to `_glFlush'
out-glut/fem-drawer.o: In function `_ZN10Fem_drawer12set_lightingEv':
/salmon/salmon-0.1/fem-drawer.cc:434: undefined reference to `_glClearColor'
/salmon/salmon-0.1/fem-drawer.cc:437: undefined reference to `_glFrontFace'
/salmon/salmon-0.1/fem-drawer.cc:439: undefined reference to `_glEnable'
/salmon/salmon-0.1/fem-drawer.cc:440: undefined reference to `_glEnable'
/salmon/salmon-0.1/fem-drawer.cc:441: undefined reference to `_glLightfv'
/salmon/salmon-0.1/fem-drawer.cc:442: undefined reference to `_glEnable'
/salmon/salmon-0.1/fem-drawer.cc:443: undefined reference to `_glEnable'
/salmon/salmon-0.1/fem-drawer.cc:444: undefined reference to `_glEnable'
/salmon/salmon-0.1/fem-drawer.cc:445: undefined reference to `_glShadeModel'
/salmon/salmon-0.1/fem-drawer.cc:449: undefined reference to `_glShadeModel'
/salmon/salmon-0.1/fem-drawer.cc:450: undefined reference to `_glDisable'
/salmon/salmon-0.1/fem-drawer.cc:451: undefined reference to `_glDisable'
out-glut/fem-drawer.o: In function `_ZN10Fem_drawer9set_colorEPf':
/salmon/salmon-0.1/fem-drawer.cc:459: undefined reference to `_glMaterialfv'
/salmon/salmon-0.1/fem-drawer.cc:461: undefined reference to `_glColor4fv'
out-glut/fem-drawer.o: In function `_ZN10Fem_drawer13draw_selectorEv':
/salmon/salmon-0.1/fem-drawer.cc:467: undefined reference to `_glBegin'
/salmon/salmon-0.1/fem-drawer.cc:472: undefined reference to `_glEnd'
out-glut/fem-drawer.o: In function `_ZN10Fem_drawer13set_depth_cueEv':
/salmon/salmon-0.1/fem-drawer.cc:481: undefined reference to `_glHint'
/salmon/salmon-0.1/fem-drawer.cc:482: undefined reference to `_glFogf'
/salmon/salmon-0.1/fem-drawer.cc:483: undefined reference to `_glFogf'
/salmon/salmon-0.1/fem-drawer.cc:484: undefined reference to `_glEnable'
/salmon/salmon-0.1/fem-drawer.cc:485: undefined reference to `_glEnable'
/salmon/salmon-0.1/fem-drawer.cc:486: undefined reference to `_glFogi'
/salmon/salmon-0.1/fem-drawer.cc:489: undefined reference to `_glFogfv'
/salmon/salmon-0.1/fem-drawer.cc:492: undefined reference to `_glDisable'
/salmon/salmon-0.1/fem-drawer.cc:495: undefined reference to `_glFlush'
out-glut/fem-model-visualize.o: In function `_ZNK20Finite_element_model9visualizeEP10Fem_drawer':
/salmon/salmon-0.1/fem-model-visualize.cc:105: undefined reference to `_glPointSize'
/salmon/salmon-0.1/fem-model-visualize.cc:107: undefined reference to `_glBegin'
/salmon/salmon-0.1/fem-model-visualize.cc:110: undefined reference to `_glVertex3dv'
/salmon/salmon-0.1/fem-model-visualize.cc:111: undefined reference to `_glEnd'
/salmon/salmon-0.1/fem-model-visualize.cc:119: undefined reference to `_glBegin'
/salmon/salmon-0.1/fem-model-visualize.cc:122: undefined reference to `_glVertex3dv'
/salmon/salmon-0.1/fem-model-visualize.cc:127: undefined reference to `_glVertex3dv'
/salmon/salmon-0.1/fem-model-visualize.cc:128: undefined reference to `_glEnd'
/salmon/salmon-0.1/fem-model-visualize.cc:133: undefined reference to `_glBegin'
/salmon/salmon-0.1/fem-model-visualize.cc:135: undefined reference to `_glLineStipple'
/salmon/salmon-0.1/fem-model-visualize.cc:137: undefined reference to `_glVertex3dv'
/salmon/salmon-0.1/fem-model-visualize.cc:138: undefined reference to `_glVertex3dv'
/salmon/salmon-0.1/fem-model-visualize.cc:140: undefined reference to `_glEnd'
/salmon/salmon-0.1/fem-model-visualize.cc:141: undefined reference to `_glLineStipple'
/salmon/salmon-0.1/fem-model-visualize.cc:152: undefined reference to `_glBegin'
/salmon/salmon-0.1/fem-model-visualize.cc:155: undefined reference to `_glVertex3dv'
/salmon/salmon-0.1/fem-model-visualize.cc:156: undefined reference to `_glVertex3dv'
/salmon/salmon-0.1/fem-model-visualize.cc:158: undefined reference to `_glEnd'
/salmon/salmon-0.1/fem-model-visualize.cc:170: undefined reference to `_glBegin'
/salmon/salmon-0.1/fem-model-visualize.cc:172: undefined reference to `_glVertex3dv'
/salmon/salmon-0.1/fem-model-visualize.cc:173: undefined reference to `_glVertex3dv'
/salmon/salmon-0.1/fem-model-visualize.cc:175: undefined reference to `_glEnd'
out-glut/fem-model-visualize.o: In function `_Z27display_tetrahedron_qualityP10Fem_drawer':
/salmon/salmon-0.1/fem-model-visualize.cc:244: undefined reference to `_glPointSize'
/salmon/salmon-0.1/fem-model-visualize.cc:247: undefined reference to `_glBegin'
/salmon/salmon-0.1/fem-model-visualize.cc:248: undefined reference to `_glVertex3dv'
/salmon/salmon-0.1/fem-model-visualize.cc:249: undefined reference to `_glEnd'
out-glut/glut-interface.o: In function `_Z7reshapeii':
/salmon/salmon-0.1/glut-interface.cc:142: undefined reference to `_glViewport'
out-glut/sweep-description-visualization.o: In function `_ZN17Sweep_description9visualizeEP10Fem_drawer':
/salmon/salmon-0.1/sweep-description-visualization.cc:22: undefined reference to `_glBegin'
/salmon/salmon-0.1/sweep-description-visualization.cc:26: undefined reference to `_glVertex3dv'
/salmon/salmon-0.1/sweep-description-visualization.cc:28: undefined reference to `_glEnd'
collect2: ld returned 1 exit status
make[1]: *** [out-glut/salmon] Error 1
make[1]: Leaving directory `/salmon/salmon-0.1'
make: *** [glut] Error 2
Does someone have a clue for us, we tried a lot of linker directories and combinations of -lglu -lglut -lopengl32 but nothing worked.
Thanks for your help.
Best regards,
Nils Ritter
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/