Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) How to cross-compile a Qt Creator project from Ubuntu to a windows executable: example 3: Hello Boost

 

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

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict