(C++) HelloBoostRegexQtCreatorSliTaz
January 17, 2018 · View on GitHub



Hello Boost.Regex using Qt Creator under SliTaz is a Hello Boost.Regex program.
Technical facts
Operating system(s) or programming environment(s)
Lubuntu 15.04 (vivid)
Qt Creator 3.1.1
- G++ 4.9.2
Libraries used:
Qt project file: ./CppHelloBoostRegexQtCreatorSliTaz/CppHelloBoostRegexQtCreatorSliTaz.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
./CppHelloBoostRegexQtCreatorSliTaz/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'; }
./CppHelloBoostRegexQtCreatorSliTaz/CppHelloBoostRegexQtCreatorSliTaz.sh
#!/bin/bash myfile="qmake" mytarget="CppHelloBoostRegexQtCreatorSliTaz" myprofile=$mytarget.pro if [ -e $myfile ] then echo "Compiler '$myfile' found" else echo "Compiler '$myfile' not found directly" #exit fi if [ -e $myprofile ] then echo "Qt Creator project '$myprofile' found" else echo "Qt Creator project '$myprofile' not found" exit fi echo "1/2: Creating makefile" $myfile $myprofile if [ -e Makefile ] then echo "Makefile created successfully" else echo "FAIL: $myfile $myprofile" exit fi echo "2/2: making makefile" make if [ -e $mytarget ] then echo "SUCCESS" else echo "FAIL" fi #Cleaning up rm *.o rm Makefile rm $mytarget