News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Stupid Question

Started by FlyingIsFun1217, March 16, 2007, 01:05:15 AM

Previous topic - Next topic

Biplab

Now you forgot to include the glut library. Add libglut.a (or libglut32.a). I don't know their difference. :)
Be a part of the solution, not a part of the problem.

FlyingIsFun1217

#16
Seems I don't have libglut.a (or libglut32.a), all I seem to have is glut32.lib
Where should I tell C::B about this? In Project->Build Options (Linker Tab?)

Thanks again!
FlyingIsFun1217

----------Edit----------
Here are the files that came with my download of glut:
-README-win32.txt
-glut.h
-glut32.lib
-glut32.dll
-glut.def

Biplab

Type the following command to create the file libglut32.a

dlltool -d glut.def -l libglut32.a

Now use this file to link. Your app will depend upon glut32.dll :)
Be a part of the solution, not a part of the problem.

FlyingIsFun1217

#18
Thank you, that seems to work very well. :)
For future reference, what does that actually do? Make a library to link to instead of a dll?

Thanks again!
FlyingIsFun1217

Biplab

Quote from: FlyingIsFun1217 on March 17, 2007, 05:23:02 PM
For future reference, what does that actually do? Make a library to link to instead of a dll?

That actually creates an import library file which a linker uses during linking process and this is true for all compilers. You can link against dll directly with GCC (I heard), but I don't know how to do that. You may search this forum for some more details. :)

Regards,

Biplab
Be a part of the solution, not a part of the problem.

FlyingIsFun1217

#20
Cool, thanks for telling me :)

Now, after doing this, I seem to just get the error that:

Quote
mingw32-g++.exe: GL\libglut32.a: No such file or directory

After adding GL\libglut32.a to the project build options' linker tab.

Biplab

It says it can't find the library. Just provide the full path to it. Example: C:/MinGW/Lib/GL/libglut32.a
Be a part of the solution, not a part of the problem.

FlyingIsFun1217

Quote from: Biplab on March 17, 2007, 05:38:08 PM
It says it can't find the library. Just provide the full path to it. Example: C:/MinGW/Lib/GL/libglut32.a

Yeah, that works. Needed to restart C::B for some reason...
So now I have a working executable! Kind of, again!
Upon startup, it says:

Quote
This application has failed to start because (null).dll was not found. Re-installing the application may fix this problem.

It says this even with glut32.dll next to it :(

Something I'll have to figure out on my own?

Thanks!
FlyingIsFun1217

Biplab

#23
Can you post me first few lines of def file? I think the calling convention is different.

Just try recreating the import library using the following command.
dlltool -U -d glut.def -l libglut32.a
Be a part of the solution, not a part of the problem.

FlyingIsFun1217

DEF File (Sorry in advance):

Quote
DESCRIPTION 'OpenGL Utility Toolkit for Win32'

VERSION 3.7

EXPORTS

   glutAddMenuEntry
   glutAddSubMenu
   glutAttachMenu
   glutBitmapCharacter
   glutBitmapLength
   glutBitmapWidth
   glutButtonBoxFunc
   glutChangeToMenuEntry
   glutChangeToSubMenu
   glutCopyColormap
   glutCreateMenu
   __glutCreateMenuWithExit
   glutCreateSubWindow
   glutCreateWindow
   __glutCreateWindowWithExit
   glutDestroyMenu
   glutDestroyWindow
   glutDetachMenu
   glutDeviceGet
   glutDialsFunc
   glutDisplayFunc
   glutEnterGameMode
   glutEntryFunc
   glutEstablishOverlay
   glutExtensionSupported
   glutForceJoystickFunc
   glutFullScreen
   glutGameModeGet
   glutGameModeString
   glutGet
   glutGetColor
   glutGetMenu
   glutGetModifiers
   glutGetWindow
   glutHideOverlay
   glutHideWindow
   glutIconifyWindow
   glutIdleFunc
   glutIgnoreKeyRepeat
   glutInit
   __glutInitWithExit
   glutInitDisplayMode
   glutInitDisplayString
   glutInitWindowPosition
   glutInitWindowSize
   glutJoystickFunc
   glutKeyboardFunc
   glutKeyboardUpFunc
   glutLayerGet
   glutLeaveGameMode
   glutMainLoop
   glutMenuStateFunc
   glutMenuStatusFunc
   glutMotionFunc
   glutMouseFunc
   glutOverlayDisplayFunc
   glutPassiveMotionFunc
   glutPopWindow
   glutPositionWindow
   glutPostOverlayRedisplay
   glutPostRedisplay
   glutPostWindowOverlayRedisplay
   glutPostWindowRedisplay
   glutPushWindow
   glutRemoveMenuItem
   glutRemoveOverlay
   glutReportErrors
   glutReshapeFunc
   glutReshapeWindow
   glutSetColor
   glutSetCursor
   glutSetIconTitle
   glutSetKeyRepeat
   glutSetMenu
   glutSetWindow
   glutSetWindowTitle
   glutSetupVideoResizing
   glutShowOverlay
   glutShowWindow
   glutSolidCone
   glutSolidCube
   glutSolidDodecahedron
   glutSolidIcosahedron
   glutSolidOctahedron
   glutSolidSphere
   glutSolidTeapot
   glutSolidTetrahedron
   glutSolidTorus
   glutSpaceballButtonFunc
   glutSpaceballMotionFunc
   glutSpaceballRotateFunc
   glutSpecialFunc
   glutSpecialUpFunc
   glutStopVideoResizing
   glutStrokeCharacter
   glutStrokeLength
   glutStrokeWidth
   glutSwapBuffers
   glutTabletButtonFunc
   glutTabletMotionFunc
   glutTimerFunc
   glutUseLayer
   glutVideoPan
   glutVideoResize
   glutVideoResizeGet
   glutVisibilityFunc
   glutWarpPointer
   glutWindowStatusFunc
   glutWireCone
   glutWireCube
   glutWireDodecahedron
   glutWireIcosahedron
   glutWireOctahedron
   glutWireSphere
   glutWireTeapot
   glutWireTetrahedron
   glutWireTorus
;    __glutSetFCB
;    __glutGetFCB

Recreating the import library just gives me the same results. :(

Thanks for your continued support!
FlyingIsFun1217

Auria

Quote from: Biplab on March 17, 2007, 05:28:03 PM
Quote from: FlyingIsFun1217 on March 17, 2007, 05:23:02 PM
For future reference, what does that actually do? Make a library to link to instead of a dll?

That actually creates an import library file which a linker uses during linking process and this is true for all compilers. You can link against dll directly with GCC (I heard), but I don't know how to do that. You may search this forum for some more details. :)

Regards,

Biplab

Actually this is a Windows feature. No need for that stuff on Mac or Linux.

FlyingIsFun1217

Heh! Glad to know...
But right now my biggest problem is that it needs a.. null?!?!... dynamic link library : /

FlyingIsFun1217 :)

Biplab

Quote from: FlyingIsFun1217 on March 17, 2007, 06:36:07 PM
But right now my biggest problem is that it needs a.. null?!?!... dynamic link library : /

Just checked it and I'm getting same error. I believe there is some mismatch. glut.h also includes gl.h and glu.h. So there could be cross-dependencies. I'm not very sure, but it's my guess.

Sorry I've reached my limits. Both with respect to knowledge and time. It's time to sleep. Will post you updates if I get any solution. :)

Regards,

Biplab
Be a part of the solution, not a part of the problem.

Auria

I can't help you with any Windows problem, sorry.

But why don't you try GLFW? As far as i have used it, it was better than GLUT - and since you can build it from source it is less likely that there will be mismatches

FlyingIsFun1217

#29
Well, after all of this confusion, I think I will try GLFW.
I remember stumbling across it at one point, but for some reason did not consider it : /
Thanks for the hint! While I try and get it set up, can you tell me if you have ever had any experience with it?

Thanks again!
FlyingIsFun1217 :)

----------Edit----------
Yeah, I'm spoiled. I'm not used to command-line building.
How can I go about building the glfw lib with minGW?

Thanks!
FlyingIsFun1217

----------Edit----------
I need to stop posting first.
Compiled it, working on installing it.

Thanks for the continued support!
FlyingIsFun1217