Author Topic: Stupid Question  (Read 15960 times)

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Stupid Question
« Reply #15 on: March 17, 2007, 04:55:00 pm »
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.

Offline FlyingIsFun1217

  • Multiple posting newcomer
  • *
  • Posts: 45
Re: Stupid Question
« Reply #16 on: March 17, 2007, 04:59:58 pm »
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
« Last Edit: March 17, 2007, 05:01:40 pm by FlyingIsFun1217 »

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Stupid Question
« Reply #17 on: March 17, 2007, 05:09:38 pm »
Type the following command to create the file libglut32.a

Code: [Select]
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.

Offline FlyingIsFun1217

  • Multiple posting newcomer
  • *
  • Posts: 45
Re: Stupid Question
« Reply #18 on: March 17, 2007, 05:23:02 pm »
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
« Last Edit: March 17, 2007, 05:28:55 pm by FlyingIsFun1217 »

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Stupid Question
« Reply #19 on: March 17, 2007, 05:28:03 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.

Offline FlyingIsFun1217

  • Multiple posting newcomer
  • *
  • Posts: 45
Re: Stupid Question
« Reply #20 on: March 17, 2007, 05:29:29 pm »
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.
« Last Edit: March 17, 2007, 05:37:33 pm by FlyingIsFun1217 »

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Stupid Question
« Reply #21 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
Be a part of the solution, not a part of the problem.

Offline FlyingIsFun1217

  • Multiple posting newcomer
  • *
  • Posts: 45
Re: Stupid Question
« Reply #22 on: March 17, 2007, 05:56:28 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

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Stupid Question
« Reply #23 on: March 17, 2007, 05:58:46 pm »
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.
Code: [Select]
dlltool -U -d glut.def -l libglut32.a
« Last Edit: March 17, 2007, 06:10:22 pm by Biplab »
Be a part of the solution, not a part of the problem.

Offline FlyingIsFun1217

  • Multiple posting newcomer
  • *
  • Posts: 45
Re: Stupid Question
« Reply #24 on: March 17, 2007, 06:22:53 pm »
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

Offline Auria

  • Almost regular
  • **
  • Posts: 152
Re: Stupid Question
« Reply #25 on: March 17, 2007, 06:33:51 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.

Offline FlyingIsFun1217

  • Multiple posting newcomer
  • *
  • Posts: 45
Re: Stupid Question
« Reply #26 on: March 17, 2007, 06:36:07 pm »
Heh! Glad to know...
But right now my biggest problem is that it needs a.. null?!?!... dynamic link library : /

FlyingIsFun1217 :)

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Stupid Question
« Reply #27 on: March 17, 2007, 07:20:55 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.

Offline Auria

  • Almost regular
  • **
  • Posts: 152
Re: Stupid Question
« Reply #28 on: March 17, 2007, 07:26:32 pm »
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

Offline FlyingIsFun1217

  • Multiple posting newcomer
  • *
  • Posts: 45
Re: Stupid Question
« Reply #29 on: March 17, 2007, 09:52:37 pm »
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
« Last Edit: March 17, 2007, 10:22:48 pm by FlyingIsFun1217 »