www.digitalmars.com         C & C++   DMDScript  

c++.windows.32-bits - Symbol Undefined errors : HELP

reply IvanScheers compuserve.com writes:
Hi,

I'm trying to compile OpenUniverse (www.openuniverse.org) with DM.   

Initially, I had a great number of Symbol Undefined errors on the glut32 lib
when linking.  By creating a new import library from a .def file, I was able to
resolve all but 3 of these errors.

What's awkward is that for the Symbol Undefined errors I was able to correct
with the import library, the function names started with a single underscore
(i.e. _glutSwapBuffers 0).  For the 3 I can't seem to resolve, the error output
lists them with a double underscore (i.e. __glutCreateMenuWithExit 8).

I've tried 3 possible names in the .def file hoping one of them would hold the
solution, but ...

Anyone who can help ?

glut32.def file for implib glut32.lib glut32.def

LIBRARY glut32
EXETYPE NT
SUBSYSTEM WINDOWS
EXPORTS

__glutCreateMenuWithExit 8 = glutCreateMenuWithExit
__glutCreateWindowWithExit 8 = glutCreateWindowWithExit
__glutInitWithExit 12 = glutInitWithExit

_glutCreateMenuWithExit 8 = glutCreateMenuWithExit
_glutCreateWindowWithExit 8 = glutCreateWindowWithExit
_glutInitWithExit 12 = glutInitWithExit

glutCreateMenuWithExit 8 = glutCreateMenuWithExit
glutCreateWindowWithExit 8 = glutCreateWindowWithExit
glutInitWithExit 12 = glutInitWithExit

_glutBitmapCharacter 8 = glutBitmapCharacter
_glutSwapBuffers 0 = glutSwapBuffers
_glutExtensionSupported 4 = glutExtensionsSupported
_glutGetModifiers 0 = glutGetModifiers
_glutLeaveGameMode 0 = glutLeaveGameMode
_glutGet 4 = glutGet
_glutMainLoop 0 = glutMainLoop
_glutReshapeFunc 4 = glutReshapeFunc
_glutIdleFunc 4 = glutIdleFunc
_glutEnterGameMode 0 = glutEnterGameMode
_glutGameModeString 4 = glutGameModeString
_glutInitWindowPosition 8 = glutInitWindowPosition
_glutInitWindowSize 8 = glutInitWindowSize
_glutInitDisplayMode 4 = glutInitDisplayMode
_glutPostRedisplay 0 = glutPostRedisplay
_glutSetWindow 4 = glutSetWindow
_glutTimerFunc 12 = glutTimerFunc
_glutMotionFunc 4 = glutMotionFunc
_glutMouseFunc 4 = glutMouseFunc
_glutSpecialFunc 4 = glutSpecialFunc
_glutKeyboardFunc 4 = glutKeyboardFunc
_glutDisplayFunc 4 = glutDisplayFunc
_glutGetWindow 0 = glutGetWindow
Jun 22 2002
parent reply "Walter" <walter digitalmars.com> writes:
Hmm. Try adding a _ in your C source to the function name. -Walter

<IvanScheers compuserve.com> wrote in message
news:af1rm2$1irv$1 digitaldaemon.com...
 Hi,

 I'm trying to compile OpenUniverse (www.openuniverse.org) with DM.

 Initially, I had a great number of Symbol Undefined errors on the glut32
lib
 when linking.  By creating a new import library from a .def file, I was
able to
 resolve all but 3 of these errors.

 What's awkward is that for the Symbol Undefined errors I was able to
correct
 with the import library, the function names started with a single
underscore
 (i.e. _glutSwapBuffers 0).  For the 3 I can't seem to resolve, the error
output
 lists them with a double underscore (i.e. __glutCreateMenuWithExit 8).

 I've tried 3 possible names in the .def file hoping one of them would hold
the
 solution, but ...

 Anyone who can help ?

 glut32.def file for implib glut32.lib glut32.def

 LIBRARY glut32
 EXETYPE NT
 SUBSYSTEM WINDOWS
 EXPORTS

 __glutCreateMenuWithExit 8 = glutCreateMenuWithExit
 __glutCreateWindowWithExit 8 = glutCreateWindowWithExit
 __glutInitWithExit 12 = glutInitWithExit

 _glutCreateMenuWithExit 8 = glutCreateMenuWithExit
 _glutCreateWindowWithExit 8 = glutCreateWindowWithExit
 _glutInitWithExit 12 = glutInitWithExit

 glutCreateMenuWithExit 8 = glutCreateMenuWithExit
 glutCreateWindowWithExit 8 = glutCreateWindowWithExit
 glutInitWithExit 12 = glutInitWithExit

 _glutBitmapCharacter 8 = glutBitmapCharacter
 _glutSwapBuffers 0 = glutSwapBuffers
 _glutExtensionSupported 4 = glutExtensionsSupported
 _glutGetModifiers 0 = glutGetModifiers
 _glutLeaveGameMode 0 = glutLeaveGameMode
 _glutGet 4 = glutGet
 _glutMainLoop 0 = glutMainLoop
 _glutReshapeFunc 4 = glutReshapeFunc
 _glutIdleFunc 4 = glutIdleFunc
 _glutEnterGameMode 0 = glutEnterGameMode
 _glutGameModeString 4 = glutGameModeString
 _glutInitWindowPosition 8 = glutInitWindowPosition
 _glutInitWindowSize 8 = glutInitWindowSize
 _glutInitDisplayMode 4 = glutInitDisplayMode
 _glutPostRedisplay 0 = glutPostRedisplay
 _glutSetWindow 4 = glutSetWindow
 _glutTimerFunc 12 = glutTimerFunc
 _glutMotionFunc 4 = glutMotionFunc
 _glutMouseFunc 4 = glutMouseFunc
 _glutSpecialFunc 4 = glutSpecialFunc
 _glutKeyboardFunc 4 = glutKeyboardFunc
 _glutDisplayFunc 4 = glutDisplayFunc
 _glutGetWindow 0 = glutGetWindow
Jul 01 2002
parent %u haytham <haytham.bi gmail.com> writes:
http://www.xmission.com/~nate/glut.html

dawnload the 711kb ,add the .lib to uer Liker under project system ,

good luck
May 18 2010