Go back to Richel Bilderbeek's homepage.

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

 

 

 

 

 

(C++) HelloBoostRegexQtCreatorLubuntuToWindows

 

BoostQt CreatorLubuntuToWindows

 

Hello Boost.Regex using Qt Creator under Lubuntu, crosscompiled to Windows is a Hello Boost.Regex program.

 

Technical facts

 

Operating system(s) or programming environment(s)

IDE(s):

Project type:

C++ standard:

Compiler(s):

Libraries used:

 

 

 

 

 

Qt project file: ./CppHelloBoostRegexQtCreatorLubuntuToWindows/CppHelloBoostRegexQtCreatorLubuntuToWindows.pro

 

QT       += core
QT       -= gui
CONFIG   += console
CONFIG   -= app_bundle
TEMPLATE = app
SOURCES += main.cpp

LIBS += -L../../Libraries/mxe/usr/i686-pc-mingw32/lib
LIBS += -lboost_regex

 

 

 

 

 

./CppHelloBoostRegexQtCreatorLubuntuToWindows/main.cpp

 

#include <iostream>
#include <boost/regex.hpp>


int main()
{
  std::string s = "Hello World";
  s = boost::regex_replace(s,boost::regex("World"),std::string("Boost"));
  std::cout << s << '\n';
}

 

 

 

 

 

./CppHelloBoostRegexQtCreatorLubuntuToWindows/CppHelloBoostRegexQtCreatorLubuntuToWindows.sh

 

#!/bin/bash
myqmake="../../Libraries/mxe/usr/i686-pc-mingw32/qt5/bin/qmake"

#Cleaning up
rm *.pro.user
rm Makefile
rm Makefile.*
rm -r release
rm -r debug
rm ui_*.h
rm qrc_*.cpp
rm moc_*.cpp
rm object_script*.*

for myprofile in `ls | egrep ".pro\>"`
do
  mytarget=`echo $myprofile | sed "s/\.pro//"`
  
  $myqmake $myprofile
  
  if [ ! -e Makefile ]
  then
    echo "FAIL: $myqmake $myprofile"
  fi
  
  make
  
  if [ -e ./release/$mytarget".exe" ]
  then
    echo $mytarget": SUCCESS"
    cp ./release/$mytarget".exe" ~/bin/
  else
    echo $mytarget": FAIL"
  fi
  
  #Cleaning up
  rm Makefile
  rm Makefile.*
  rm -r release
  rm -r debug
  rm ui_*.h
  rm qrc_*.cpp
  rm moc_*.cpp
  rm object_script*.*

done #next .pro file

 

 

 

 

 

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