Skip to content

Latest commit

 

History

History
130 lines (73 loc) · 7.28 KB

CppHelloBoostLexical_CastQtCreatorSliTaz.md

File metadata and controls

130 lines (73 loc) · 7.28 KB

 

 

 

 

 

 

BoostQt CreatorSliTaz

 

Hello Boost.Lexical_cast using Qt Creator under SliTaz is a Hello Boost.Lexical_cast program.

 

Technical facts

 

Operating system(s) or programming environment(s)

IDE(s):

Project type:

C++ standard:

Compiler(s):

Libraries used:

  • STL STL: GNU ISO C++ Library, version 4.9.2

 

 

 

 

 

Qt project file: ./CppHelloBoostLexical_CastQtCreatorSliTaz/CppHelloBoostLexical_CastQtCreatorSliTaz.pro

 


include(../../ConsoleApplication.pri) #Or use the code below # QT += core # QT += gui # greaterThan(QT_MAJOR_VERSION, 4): QT += widgets # CONFIG   += console # CONFIG   -= app_bundle # TEMPLATE = app # CONFIG(release, debug|release) { #   DEFINES += NDEBUG NTRACE_BILDERBIKKEL # } # QMAKE_CXXFLAGS += -std=c++11 -Wall -Wextra -Weffc++ # unix { #   QMAKE_CXXFLAGS += -Werror # } include(../../Libraries/Boost.pri) #Or use the code below # win32 { #   INCLUDEPATH += \ #     ../../Libraries/boost_1_54_0 # } SOURCES += main.cpp

 

 

 

 

 

./CppHelloBoostLexical_CastQtCreatorSliTaz/main.cpp

 


#include <iostream> #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Weffc++" #pragma GCC diagnostic ignored "-Wunused-local-typedefs" #include <boost/lexical_cast.hpp> #pragma GCC diagnostic pop int main() {   const int x = 110;   const int y = 0;   const int z = 1;   const std::string s     = std::string("He")     + boost::lexical_cast<std::string>(x)     + std::string(" w")     + boost::lexical_cast<std::string>(y)     + std::string("r")     + boost::lexical_cast<std::string>(z)     + std::string("d");   std::cout << s << '\n'; } /* Screen output: He110 w0r1d */

 

 

 

 

 

./CppHelloBoostLexical_CastQtCreatorSliTaz/CppHelloBoostLexical_CastQtCreatorSliTaz.sh

 


#!/bin/bash myfile="qmake" mytarget="CppHelloBoostLexical_CastQtCreatorSliTaz" 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 Windows 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