From d53a6ca2cd9f9ebd1a406d3bb71b72ede9c6bece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Wed, 5 Mar 2014 06:15:44 +0100 Subject: [PATCH] readme: To compile Cppcheck, partial C++11 support is needed. --- readme.md | 9 ++++----- readme.txt | 12 +++++++----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/readme.md b/readme.md index 0b02d59c9..e5fb695a7 100644 --- a/readme.md +++ b/readme.md @@ -18,12 +18,11 @@ A manual is available [online](http://cppcheck.sourceforge.net/manual.pdf). ## Compiling -Any C++ compiler should work. +Any C++11 compiler should work. For compilers with partial C++11 support it may work. If your compiler has the C++11 features that are available in Visual Studio 2010 then it will work. If nullptr is not supported by your compiler then this can be emulated using the header lib/cxx11emu.h. To build the GUI, you need Qt. -When building the command line tool, [PCRE](http://www.pcre.org/) is normally used. -PCRE is optional. +When building the command line tool, [PCRE](http://www.pcre.org/) is optional. It is used if you build with rules. There are multiple compilation choices: * qmake - cross platform build tool @@ -90,13 +89,13 @@ Flags: If you just want to build Cppcheck without dependencies then you can use this command: ```shell -g++ -o cppcheck -std=c++0x -Iexternals/tinyxml -Ilib cli/*.cpp lib/*.cpp externals/tinyxml/*.cpp +g++ -o cppcheck -std=c++0x -include lib/cxx11emu.h -Iexternals/tinyxml -Ilib cli/*.cpp lib/*.cpp externals/tinyxml/*.cpp ``` If you want to use `--rule` and `--rule-file` then dependencies are needed: ```shell -g++ -o cppcheck -std=c++0x -lpcre -DHAVE_RULES -Ilib -Iexternals/tinyxml cli/*.cpp lib/*.cpp externals/tinyxml/*.cpp +g++ -o cppcheck -std=c++0x -include lib/cxx11emu.h -lpcre -DHAVE_RULES -Ilib -Iexternals/tinyxml cli/*.cpp lib/*.cpp externals/tinyxml/*.cpp ``` ### MinGW diff --git a/readme.txt b/readme.txt index e5e0be77b..fe82e107d 100644 --- a/readme.txt +++ b/readme.txt @@ -14,12 +14,14 @@ Manual Compiling - Any C++ compiler should work. + Any C++11 compiler should work. For compilers with partial C++11 support it may work. If + your compiler has the C++11 features that are available in Visual Studio 2010 then it + will work. If nullptr is not supported by your compiler then this can be emulated using + the header lib/cxx11emu.h. To build the GUI, you need Qt. - When building the command line tool, PCRE is normally used. - PCRE is optional. + When building the command line tool, PCRE is optional. It is used if you build with rules. There are multiple compilation choices: * qmake - cross platform build tool @@ -68,10 +70,10 @@ Compiling g++ (for experts) ================= If you just want to build Cppcheck without dependencies then you can use this command: - g++ -o cppcheck -std=c++0x -Iexternals/tinyxml -Ilib cli/*.cpp lib/*.cpp externals/tinyxml/*.cpp + g++ -o cppcheck -std=c++0x -include lib/cxx11emu.h -Iexternals/tinyxml -Ilib cli/*.cpp lib/*.cpp externals/tinyxml/*.cpp If you want to use --rule and --rule-file then dependencies are needed: - g++ -o cppcheck -std=c++0x -lpcre -DHAVE_RULES -Ilib -Iexternals/tinyxml cli/*.cpp lib/*.cpp externals/tinyxml/*.cpp + g++ -o cppcheck -std=c++0x -include lib/cxx11emu.h -lpcre -DHAVE_RULES -Ilib -Iexternals/tinyxml cli/*.cpp lib/*.cpp externals/tinyxml/*.cpp mingw =====