(C++) How to cross-compile a Qt Creator project from Ubuntu to a windows executable: example 3: Hello Boost
This is example 3, and one of the solutions of answering the Qt FAQ How to cross-compile a Qt Creator project from Ubuntu to a windows executable?.
It shows how to cross-compile a console application with a Boost library.
The project is set up as Hello Boost under Qt Creator under Ubuntu.
Because I was trying to solve the Qt FAQ How to cross-compile a Qt Creator project from Ubuntu to a windows executable?, I compiled the code as follows:
This generates a main.o file. Linking, however, fails due to many 'undefined reference to [some STL function]' link errors, using any of the lines below:
i586-mingw32msvc-ld -o MyWin.exe main.o -L/usr/lib -lboost_regex -lstdc++ i586-mingw32msvc-ld -o MyWin.exe main.o -L/usr/lib -lboost_regex -L/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj -lstdc++ i586-mingw32msvc-ld -o MyWin.exe main.o -L/usr/lib -lboost_regex -L/usr/lib/gcc/i586-mingw32msvc/4.2.1-sjlj -lgcc -lstdc++ -lsupc++




