|
commonlib
|
CommonLib is a set of classes that can be shared across projects. Idea is to to add common functionality between projects and to write code only once. Everyone is welcome to contribute to the library.
Windows 32-bit: cmake -G "Visual Studio 15 2017" .. -DCMAKE_INSTALL_PREFIX=C:\\InstallPath\\CommonLib
Windows 64-bit: cmake -G "Visual Studio 15 2017 Win64" .. -DCMAKE_INSTALL_PREFIX=C:\\InstallPath\\CommonLib
This will create x86 or x64 solution file with Release and Debug targets and will install.
Open solution file from build folder and run the INSTALL project, this will create library files.
Open project and go to VC++ Directories page (Project -> Properties -> VC++ Directories).
Add header files from cmake under "Include Directories" (e.g. C:\InstallPath\CommonLib\Include).
Add lib files from cmake under "Library Directories" (e.g. C:\InstallPath\CommonLib\lib).
Inside your project you can include header files like this:
```cpp #include <commonlib/memory/memorywatch.h> ````
and you need to use namespaces (e.g. using namespace Dewesoft::Utils::Memory)
testcommonlib project/test_memory.cpp file