Home » Language IDEs » CDT » Glut / Eclipse on Vista 64
Glut / Eclipse on Vista 64 [message #495588] Thu, 05 November 2009 07:35 Go to next message
Michael Sgier  is currently offline Michael Sgier
Messages: 25
Registered: July 2009
Junior Member
Hi
Im currently on Vista64 with Eclipse 32bit. I can compile but not debug. Anyway I'm developping on Linux and simply want to compile later for Windows as well. Will that work on Vista 32 and 64? ( shared lib )

Now I need to integrate Glut. There's only a 32 bit version...So I simply try this? Which version?

Thanks Michael

[Updated on: Thu, 05 November 2009 08:15]

Re: Glut / Eclipse on Vista 64 [message #496007 is a reply to message #495588 ] Fri, 06 November 2009 19:12 Go to previous messageGo to next message
Marc-Andre Laperle  is currently offline Marc-Andre Laperle
Messages: 15
Registered: July 2009
Junior Member
Michael Sgier wrote
I can compile but not debug.


If you use MinGW, you probably don't have gdb in your bin folder. Get it at sourceforge, in the folder GNU Source-Level Debugger, then Release Candidate_ gdb-6.3, gdb-6.3-2.exe. The installer should ask where MinGW is, by default it's C:\MinGW. Make sure gdb.exe is in C:\MinGW\bin once the installation is completed. Try to debug, if it can't find gdb.exe, either add C:\MinGW\bin to your windows PATH variable of specify the full path in the debugger tab of your Run configuration (Run in menu, Run configurations...).

Changing PATH in Vista/7
Changing PATH in 2000/XP

(Damn, I lost a big part of my post at this point).

Short version:

The shared library compiled in 32 bit on Windows will work on both Vistas, the same one won't work on Linux. You can share the code provided that you don't use anything OS specific, only use standard stuff and gl.h, glu.h, glut.h. On Windows, try Nate Robins GLUT. You will probably need to add opengl32, glu32 and glut32.dll in your Linker settings. On Linux you should have freeglut available in your distribution. You'll need GL, GLU, GLUT in your linker settings.
Re: Glut / Eclipse on Vista 64 [message #496024 is a reply to message #496007 ] Sat, 07 November 2009 05:34 Go to previous messageGo to next message
Michael Sgier  is currently offline Michael Sgier
Messages: 25
Registered: July 2009
Junior Member
Thanks but why use a old gdb? I'm using:
Eclipse Platform
Version: 3.4.2

Anyway I did so and get:
Error: dll starting at 0x76e31000 not found.

Error: dll starting at 0x76d61000 not found.

Maybe try a newer gdb? As I said I'm on Vista64 but Eclipse is 32bit.

-------
The shared library compiled in 32 bit on Windows will work on both Vistas,
------
Good to hear.- I'll need to compile lastly on Darwin as well.
Regards Michael

Re: Glut / Eclipse on Vista 64 [message #496063 is a reply to message #496024 ] Sat, 07 November 2009 13:51 Go to previous messageGo to next message
Marc-Andre Laperle  is currently offline Marc-Andre Laperle
Messages: 15
Registered: July 2009
Junior Member
Michael Sgier

Thanks but why use a old gdb?



I tried 6.6 and 6.8 once and they didn't work well for me. 7.0 just got out so my guess is that some commands to GDB will need to be adapted. The adapted commands for Windows are used when you set your command set to Standard (Windows) in your debug configuration. That said, it might also work fine with 7.0, you're welcomed to try it Wink I also suggested 6.3 because there's an installer for it which is slightly easier.

Michael Sgier

Anyway I did so and get:
Error: dll starting at 0x76e31000 not found.

Error: dll starting at 0x76d61000 not found.



This shouldn't be a problem, I get these and can debug through my program. This probably means you won't be able to debug into these DLL but you probably won't need to.

Michael Sgier

Maybe try a newer gdb? As I said I'm on Vista64 but Eclipse is 32bit.



This shouldn't be a problem. I'm on Windows 7 x64 and it works fine. As I said above, you can try 7.0 but backup your MinGW folder first.

Michael Sgier

Good to hear.- I'll need to compile lastly on Darwin as well.



If you're on pure Darwin then I think glut doesn't come with it, you will need to compile it yourself or with something like MacPorts and you build your program petty much like on Linux. If your on Mac OS X, you can instead use the one included in the frameworks. You will need to add something like this where you include glut:

#ifdef __APPLE__
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif

and instead of the GL, GLU and GLUT libraries in your linker settings, you go to Miscellaneous and add the flags -framework GLUT -framework OpenGL.
Re: Glut / Eclipse on Vista 64 [message #496209 is a reply to message #496063 ] Mon, 09 November 2009 06:21 Go to previous messageGo to next message
Michael Sgier  is currently offline Michael Sgier
Messages: 25
Registered: July 2009
Junior Member
Thanks but I can't use GDB 6.3. Apart the error msg I even have to kill the process. I try 7.0 someday meanwhile I continue on Linux.
Re: Glut / Eclipse on Vista 64 [message #496327 is a reply to message #496209 ] Mon, 09 November 2009 12:46 Go to previous messageGo to next message
Marc-Andre Laperle  is currently offline Marc-Andre Laperle
Messages: 15
Registered: July 2009
Junior Member
A dll is probably missing at runtime, probably glut32.dll. Try to copy the dll in your working directory, this would be your project directory if you didn't change it (the one containing Debug, Release). If it still doesn't launch, try running it from from Windows Explorer and see if any error pops up. You will need to copy your exe to your project directory to keep the same working dir (or just start it with command prompt).
Re: Glut / Eclipse on Vista 64 [message #496505 is a reply to message #496327 ] Tue, 10 November 2009 06:30 Go to previous messageGo to next message
Michael Sgier  is currently offline Michael Sgier
Messages: 25
Registered: July 2009
Junior Member
Many thanks. I had specified a lib path...shouldn't that work? Well copying into project root helped.
Even better...so I don't need any 64bit software. Very Happy
Re: Glut / Eclipse on Vista 64 [message #496551 is a reply to message #496505 ] Tue, 10 November 2009 09:16 Go to previous messageGo to next message
Marc-Andre Laperle  is currently offline Marc-Andre Laperle
Messages: 15
Registered: July 2009
Junior Member
Michael Sgier
Many thanks. I had specified a lib path...shouldn't that work?


That will make it link when you build. At run-time, it searches for the dll in the working directory and in the system folder, c:\windows\system32 for 32 bit and c:\windows\syswow64 for 64 bit. I prefer having my dlls in the working directory so that they don't get mixed with the system stuff but it makes sense to have them in system for a driver or a bigger dll that is shared between applications.
Re: Glut / Eclipse on Vista 64 [message #498245 is a reply to message #496551 ] Mon, 16 November 2009 03:01 Go to previous message
Michael Sgier  is currently offline Michael Sgier
Messages: 25
Registered: July 2009
Junior Member
Thanks now on another project I get:
"Program is not a recognized executable. E:\X-Plane\X-Plane.exe
Not a valid archive file."

This when trying to debug a shared lib. (xplane plugin)
Vista64 <-> xplane32 bit?
What do you suggest?
Many thanks Michael

Previous Topic:unexpected result
Next Topic:Invoking a make target from the keyboard?
Goto Forum: