readme: To compile Cppcheck, partial C++11 support is needed.

This commit is contained in:
Daniel Marjamäki 2014-03-05 06:15:44 +01:00
parent 5eb79f0fa5
commit d53a6ca2cd
2 changed files with 11 additions and 10 deletions

View File

@ -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

View File

@ -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
=====