Hello everybody,
I've developed a Qt4 application currently working on Linux but I need to cross-compile it for Windows 7 (x86_64), and I use a Makefile instead of qmake. It's the first time I do a cross-compilation, but I have a doubt concretelly in one thing.
I haven't followed yet the tutorial of your website, but I've no troubles with that. It's pretty clear. So, suppose I've reached without
problems the step 4.
Since I don't use qmake, I have to follow now the step 5d (using Make) instead of 5c (using qmake), but my doubt is, what about the static linking of Qt?
My original Makefile (summarized) is:
CXX=g++-4.8
CXXFLAGS=-std=c++11 -pedantic -Wall -pedantic-errors -Wextra
IPATH=-I/usr/include/qt4/ -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtSql
LDFLAGS=-lQtGui -lQtSql -lQtCore
OBJS=main.o
HEADERS=mymoc1.hpp mymoc2.hpp other-headers
all: myexec
myexec: $(OBJS)
$(CXX) $(CXXFLAGS) $(OBJS) -o $@ $(LDFLAGS)
main.o: main.cpp $(HEADERS)
$(CXX) -c $(CXXFLAGS) $< -o $@ $(IPATH)
mymoc1.hpp: the-header-needing-moc.hpp
moc $< -o $@
mymoc2.hpp: other-header-needing-moc.hpp
moc $< -o $@