Skip to content

Latest commit

 

History

History
113 lines (65 loc) · 4.37 KB

CppHelloBoostRegexQtCreatorLubuntu.md

File metadata and controls

113 lines (65 loc) · 4.37 KB

BoostQt CreatorLubuntu

Hello Boost.Regex using Qt Creator under Lubuntu 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:

  • Boost Boost: version 1.55
  • Qt Qt: version 5.4.1 (32 bit)
  • STL STL: GNU ISO C++ Library, version 4.9.2

 

 

 

 

 

Qt project file: ./CppHelloBoostRegexQtCreatorLubuntu/CppHelloBoostRegexQtCreatorLubuntu.pro

 


QT       += core QT       -= gui CONFIG   += console CONFIG   -= app_bundle TEMPLATE = app SOURCES += main.cpp LIBS += \   -lboost_date_time \   -lboost_filesystem \   -lboost_program_options \   -lboost_regex \   -lboost_signals \   -lboost_system

 

 

 

 

 

./CppHelloBoostRegexQtCreatorLubuntu/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'; }

 

 

 

 

 

./CppHelloBoostRegexQtCreatorLubuntu/CppHelloBoostRegexQtCreatorLubuntu.sh

 


#!/bin/bash myfile="qmake" mytarget="CppHelloBoostRegexQtCreatorLubuntu" myprofile=$mytarget.pro if [ ! -e $myprofile ] then   echo "Qt Creator project '$myprofile' not found"   exit fi $myfile $myprofile if [ ! -e Makefile ] then   echo "FAIL: $myfile $myprofile"   exit fi make if [ -e $mytarget ] then   echo $mytarget": SUCCESS" else   echo $mytarget": FAIL" fi #Cleaning up rm *.o rm Makefile rm $mytarget