(C++) MxeExample4
February 24, 2017 · View on GitHub
(C++) MxeExample4



MXE example 4: Hello Boost is an MXE example to cross-compile a Hello Boost program from GNU/Linux to Windows.
Technical facts
Operating system(s) or programming environment(s)
Lubuntu 15.04 (vivid)
Qt Creator 3.1.1
- G++ 4.9.2
Libraries used:
STL: GNU ISO C++ Library, version
4.9.2
Qt project file: ./CppMxeExample4/CppMxeExample4.pro
QT -= core QT -= gui CONFIG += console CONFIG -= app_bundle TEMPLATE = app SOURCES += main.cpp
./CppMxeExample4/main.cpp
#include <iostream> #include <boost/lexical_cast.hpp> int main() { if (boost::lexical_cast<std::string>(123) == "123") { std::cout << "Hello Boost" << '\n'; } }
./CppMxeExample4/test.sh
#!/bin/bash # Calls crosscompiletowindows and cleans up afterwards myfile="crosscompiletowindows.sh" if [ -e $myfile ] then echo "'$myfile' found" else echo "'$myfile' not found" fi ./$myfile rm Makefile* rm *.o #rm -r release #rm -r debug