Cygwin compiler issues
by Ron Yacketta · in Torque Game Engine · 10/20/2003 (5:21 am) · 4 replies
Folks,
I have been mucking with cygwin for nearly a week now; trying to compile TGE.
I get the following error when cygwin goes to ld the .exe
the mingw libs are installed in /lib/mingw
not sure what the problem is; under a "true" linux box I would use ldconfig to rebuild the cache, but this is not possible when running a "fake" linux under winblows
any help?
-Ron
I have been mucking with cygwin for nearly a week now; trying to compile TGE.
I get the following error when cygwin goes to ld the .exe
$ make --> Linking out.GCC3.RELEASE/torqueDemo.exe /usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../i686-pc-cygwin/bin/ld: cannot fi nd -lmingw32 collect2: ld returned 1 exit status make: *** [out.GCC3.RELEASE/torqueDemo.exe] Error 1
the mingw libs are installed in /lib/mingw
RYackett@usaryackettb /cygdrive/c/TGE/engine $ ls /lib/mingw CRT_fp10.o crtst.o libgluix.a libmoldnamed.a libstdc++.a CRT_fp8.o dllcrt1.o libgmon.a libmsvcr70.a libstdc++.l CRT_noglob.o dllcrt2.o libm.a libmsvcr70d.a libsupc++.a binmode.o gcrt0.o libmingw32.a libmsvcr71.a libsupc++.l crt1.o libcoldname.a libmingwex.a libmsvcr71d.a libz.a crt2.o libcrtdll.a libmingwthrd.a libmsvcrt.a libz.dll.a crtmt.o libglui.a libmoldname.a libmsvcrtd.a txtmode.o
not sure what the problem is; under a "true" linux box I would use ldconfig to rebuild the cache, but this is not possible when running a "fake" linux under winblows
any help?
-Ron
#2
BTW, in case some do not know, if using the GCC compilers from Cygwin, your product will fall under the GPL and your source code will have to be distributed with the binaries. The reason is by default, all compiled code links in the Cygwin1.dll which uses GPL code, thereby infecting all code that links to it. You can get around this by compiling with the "-mno-cygwin" flag or installing MinGW GCC and changing your path variable to look in your mingw /bin directory before it looks in the Cygwin /bin directory.
You can check what DLLs are linked in your executables by using the "cygcheck" command.
11/09/2003 (7:49 am)
It looks like a path problem. Did you use the "-L" flag to provide the directory path for your library?BTW, in case some do not know, if using the GCC compilers from Cygwin, your product will fall under the GPL and your source code will have to be distributed with the binaries. The reason is by default, all compiled code links in the Cygwin1.dll which uses GPL code, thereby infecting all code that links to it. You can get around this by compiling with the "-mno-cygwin" flag or installing MinGW GCC and changing your path variable to look in your mingw /bin directory before it looks in the Cygwin /bin directory.
You can check what DLLs are linked in your executables by using the "cygcheck
#3
Fixed the above error by adding -L/lib/mingw before -lmingw32, now I get the following
any ideas folks?
-Ron
11/09/2004 (7:37 am)
Oldie but googie :)Fixed the above error by adding -L/lib/mingw before -lmingw32, now I get the following
--> Linking out.GCC3.RELEASE/torqueDemo.exe /lib/mingw/libstdc++.a(eh_alloc.o)(.text+0x96):eh_alloc.cc: undefined reference to '__CRT_MT' /lib/mingw/libstdc++.a(eh_alloc.o)(.text+0x129):eh_alloc.cc: undefined reference to '__CRT_MT' /lib/mingw/libstdc++.a(eh_alloc.o)(.text+0x172):eh_alloc.cc: undefined reference to '__CRT_MT' /lib/mingw/libstdc++.a(eh_alloc.o)(.text+0x1c9):eh_alloc.cc: undefined reference to '__CRT_MT' /lib/mingw/libstdc++.a(eh_alloc.o)(.text+0x1eb):eh_alloc.cc: undefined reference to '__CRT_MT' /lib/mingw/libstdc++.a(eh_globals.o)(.text+0x42):eh_globals.cc: undefined refere nce to '___mingwthr_key_dtor' /lib/mingw/libstdc++.a(eh_globals.o)(.text+0x1bb):eh_globals.cc: undefined refer ence to '__CRT_MT' collect2: ld returned 1 exit status make[1]: *** [out.GCC3.RELEASE/torqueDemo.exe] Error 1 make: *** [default] Error 2
any ideas folks?
-Ron
#4
If you aren't tied to cygwin except for needing the ability to compile on a windows box using POSIX makefiles (like TGE provides), I'd recommend fresh installing the latest MingW and MinSys packages from MingW Home Page, and then using MinSys instead of Cygwin.
Once I reconfigured my makefile with make -f mk/configure.mk, I had to make very minimal (like 2) obvious changes and it worked like a charm.
11/09/2004 (8:08 am)
As far as I know, cygwin and mingw are two separate installs that do the same thing...not sure why you are crossing them (or even if you are for sure).If you aren't tied to cygwin except for needing the ability to compile on a windows box using POSIX makefiles (like TGE provides), I'd recommend fresh installing the latest MingW and MinSys packages from MingW Home Page, and then using MinSys instead of Cygwin.
Once I reconfigured my makefile with make -f mk/configure.mk, I had to make very minimal (like 2) obvious changes and it worked like a charm.
Associate Kyle Carter
Also, are you sure that cygwin knows it shouldn't be caching data?