Qt Creator build errors using cygwin libraries
I am using Qt Creator on Windows 7x64 based on Qt 4.7.4 and mingw32. I need to include external static libs built under cygwin. I am getting quite a few of these build errors:
undefined reference to
__getreent' undefined reference to__errno'
I see a lot of posts related to this issue but I haven't been able to grok solution ... if there is any. I gather cygwin doesn't play well with mingw32 ? Can anybody advise ??
I added these lines to my .pro file to reference the libraries built under cygwin:
INCLUDEPATH += C:/cygwin/home/sberger/adet/trunk/adet_codec/include
LIBS += -LC:/cygwin/home/sberger/adet/trunk/adet_codec/lib -lAdetEncodecode
LIBS += -LC:/cygwin/lib -lbz2 -lmagic -lz
I tried adding other libs under cygwin such as libcygwin.a and others under C:\cygwin\lib\gcc\i686-w64-mingw32\4.5.3 like libgcc_s.a . That triggered a lot more undefined references
I also tried adding -mno-cygwin to CFLAG and CXXFLAGS in the Makefile.Release . That didn't make a difference.
Any feedback appreciated. Thanks!
Cygwin libraries cannot link to MinGW libraries.
Cygwin provides a POSIX environment on Windows, but MinGW produces native Win32 applications. The POSIX layer and native Win32 are considered different platforms (just like how Linux and Windows are different platforms).
If you want to link to Cygwin libraries, your Qt libraries must be compiled from scratch using a Cygwin compiler (but I'm not sure if anyone has done that successfully before)
Thanks for the info!