Hello, I am trying to cross-compile (on Linux for Windows 32-bit) a simple Qt program. Just one main.cpp file that includes QTime. Here is my Makefile:
main: main.cpp Makefile
$(CCPATH)$(PREFIX)g++ -o main main.cpp -I$(QTDIR)/include -I$(QTDIR)/include/Qt -I$(QTDIR)/include/QtCore -L$(QTDIR)/lib -lQtCore -pipe -D_REENTRANT -DQT_CORE_LIB
Now, if I switch the comments on CCPATH and PREFIX, making them both be blank, it compiles and works fine. (In other words, it compiles fine on Linux for Linux.) However, as it is shown above, I get the error:
/usr/mw32/bin/../lib/gcc/i686-w64-mingw32/4.5.4/../../../../i686-w64-mingw32/bin/ld: cannot find -lQtCore
In case you cannot see because of this horrible font, the -I$(QTCORE) are all with a capital i, and the -lQtCore has a lowercase L.
Any reason why mingw-w64 cannot build my program, but regular g++ can?
Thanks a bunch!
Log in to post a comment.