Go back to Richel Bilderbeek's homepage.

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

 

 

 

 

 

(C++) MxeExample4

 

BoostQt CreatorLubuntu

 

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)

IDE(s):

Project type:

C++ standard:

Compiler(s):

Libraries used:

 

 

 

 

 

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

 

 

 

 

 

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

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict

This page has been created by the tool CodeToHtml