sync build instructions from readme.txt (#962)

This commit is contained in:
hexcoder 2017-09-19 19:01:43 +02:00 committed by Daniel Marjamäki
parent 6d69845737
commit 78ae435a94
1 changed files with 5 additions and 4 deletions

View File

@ -91,26 +91,27 @@ Flags:
If you just want to build Cppcheck without dependencies then you can use this command:
```shell
g++ -o cppcheck -std=c++0x -include lib/cxx11emu.h -Iexternals/tinyxml -Ilib cli/*.cpp lib/*.cpp externals/tinyxml/*.cpp
g++ -o cppcheck -std=c++0x -include lib/cxx11emu.h -Iexternals/simplecpp -Iexternals/tinyxml -Ilib cli/*.cpp lib/*.cpp externals/simplecpp/simplecpp.cpp externals/tinyxml/*.cpp
```
If you want to use `--rule` and `--rule-file` then dependencies are needed:
```shell
g++ -o cppcheck -std=c++0x -include lib/cxx11emu.h -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/simplecpp -Iexternals/tinyxml cli/*.cpp lib/*.cpp externals/simplecpp/simplecpp.cpp externals/tinyxml/*.cpp
```
### MinGW
```shell
make LDFLAGS=-lshlwapi
mingw32-make LDFLAGS=-lshlwapi
```
### Other Compiler/IDE
1. Create a empty project file / makefile.
2. Add all cpp files in the cppcheck cli and lib folders to the project file / makefile.
3. Compile.
3. Add all cpp files in the externals folders to the project file / makefile.
4. Compile.
### Cross compiling Win32 (CLI) version of Cppcheck in Linux