Thank you very much for the feedback! I tried what you suggested. It
took me a while, but in the end I managed to get it to work. That's great!
As you can see, I don't use the -static option. I also got rid of the
"-mno-cygwin -mwindows" options.
$ make -f Makefile.win
g++.exe -c hello.c -o hello.o -I/usr/X11R6/include -I/usr/local/include
g++.exe hello.o -o "TestFreeGlut.exe" -L/usr/X11R6/lib -Wl,--rpath
/usr/local/lib/ -lGL -lGLU -lX11 -lglut
Thanks a lot again, I will immediately try to port my application to it.
>>Now I am desperately trying to re-compile one of my applications that
>>uses the original version of glut for freeglut. As a test I am trying to
>>re-compile "hello.c", which comes as an example. It doesn't seem to
>>work, and I get various kinds of linker problems. I am sure that the
>>g++.exe hello.o -o "TestFreeGlut.exe" -L"C:/cygwin/usr/local/lib"
>>-L"C:/cygwin/usr/X11R6/lib" -lstdc++ -lmingw32 -lopengl32 -lglu -lX11
>>-lglut -mwindows -mno-cygwin
>>hello.o(.text+0x1ae):hello.c: undefined reference to `__imp__glutInit@...'
>>hello.o(.text+0x1bf):hello.c: undefined reference to
> I'll be a bit wishy-washy about freeglut/OpenGLUT since you mention both
> Two possibilities come to mind:
> * You may not have told GCC where to find the GLUT/freeglut/OpenGLUT
> library. The -L"C:/cygwin/usr/local/lib" may or may not be
> sufficient. In my setup, CygWIN does not see the "C:..." type
> paths at all, though that may depend upon how you have configured
> Try adding this instead of the C:... info:
> -L/usr/local -Wl,-R/usr/local
> (And if using OpenGLUT, make sure that you link with
> -lopenglut rather than -lglut. Unlike freeglut, OpenGLUT
> defaults to living peacably with GLUT (and freeglut).)
> The "-Wl,-R..." bit may not be required. But it is required
> on some systems, and does not cause harm where it is not required.
> * If you are using mingw32 (is that what "-mwindows -mno-cygwin"
> does?), you may be tripping over a mingw32 bug. I don't know
> the exact problem, but I gather that it tends to have trouble
> with shared-object (a.k.a. dynamic link) libraries. Try static
> linking. Link (and maybe recompile) with:
> ...added to the options.
> I don't know if either of the above will be of any help, but it doesn't
> hurt to suggest them.
> Good luck.