Skip to content

Latest commit

 

History

History
118 lines (69 loc) · 2.75 KB

File metadata and controls

118 lines (69 loc) · 2.75 KB

 

 

 

 

 

 

BoostQt CreatorUbuntutoQt CreatorWindows

 

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.

 

 

 

 

 

Downloads

 

 

 

 

 

 

Project information

 

The project is set up as Hello Boost under Qt Creator under Ubuntu.

 

 

 

 

 

Process

 

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:

 


i586-mingw32msvc-g++ -c main.cpp -I/usr/include/boost

 

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++