|
| 1 | + |
| 2 | +To compile and run an application using memory-safe-cpp: |
| 3 | + |
| 4 | +0. Check out memory-safe-cpp project recursively (yes, it refers to a few other modules) |
| 5 | + |
| 6 | +1. Compiler/platform/language: |
| 7 | + |
| 8 | + - Linux: GCC and CLANG (latest versions) |
| 9 | + - Windows: MSVC (latest version) |
| 10 | + |
| 11 | +Currently only 64-bit platforms are supported. |
| 12 | +C++17 is required. |
| 13 | + |
| 14 | +1. Add paths to the following libraries: |
| 15 | + |
| 16 | + - [MEMORY-SAFE-CPP]/library/src/iibmalloc/src/foundation/include; |
| 17 | + - [MEMORY-SAFE-CPP]/library/src/iibmalloc/src/foundation/3rdparty/fmt/include; |
| 18 | + - [MEMORY-SAFE-CPP]/library/src/iibmalloc/src; |
| 19 | + - [MEMORY-SAFE-CPP]/library/src; |
| 20 | + (for GCC and CLANG add respective -I compiler option; for MSVC: update VC++ directories -> include directories) |
| 21 | + |
| 22 | +2. Add the following source files: |
| 23 | + |
| 24 | + - [MEMORY-SAFE-CPP]/library/src/iibmalloc/src/foundation/3rdparty/fmt/src/format.cc |
| 25 | + - [MEMORY-SAFE-CPP]/library/src/iibmalloc/src/foundation/src/std_error.cpp |
| 26 | + - [MEMORY-SAFE-CPP]/library/src/iibmalloc/src/foundation/src/safe_memory_error.cpp |
| 27 | + - [MEMORY-SAFE-CPP]/library/src/iibmalloc/src/foundation/src/log.cpp |
| 28 | + - [MEMORY-SAFE-CPP]/library/src/iibmalloc/src/foundation/src/tagged_ptr_impl.cpp |
| 29 | + - [MEMORY-SAFE-CPP]/library/src/iibmalloc/src/foundation/src/cpu_exceptions_translator.cpp |
| 30 | + |
| 31 | + Also, on Linux: |
| 32 | + |
| 33 | + - [MEMORY-SAFE-CPP]/library/src/iibmalloc/src/page_allocator_linux.cpp |
| 34 | + - [MEMORY-SAFE-CPP]/library/src/iibmalloc/src/iibmalloc_linux.cpp |
| 35 | + |
| 36 | + Respectively, on Windows, |
| 37 | + |
| 38 | + - [MEMORY-SAFE-CPP]/library/src/iibmalloc/src/page_allocator_windows.cpp |
| 39 | + - [MEMORY-SAFE-CPP]/library/src/iibmalloc/src/iibmalloc_windows.cpp |
| 40 | + |
| 41 | +3. Add the following #include directives to code: |
| 42 | + - #include <fmt/format.h> |
| 43 | + - #include <foundation.h> |
| 44 | + - #include <nodecpp_assert.h> |
| 45 | + - #include <iibmalloc.h> |
| 46 | + - #include <safe_ptr.h> |
| 47 | + |
| 48 | +4. Build with a compiler (in case of compiler errors like missing include files or unresolved calls, etc check above steps first, especially step 0) |
| 49 | + |
| 50 | +5. Proceed to safety checks with Code Checker (see [MEMORY-SAFE-CPP]/checker/doc/CHECKER-QUICK-START.md for details |
0 commit comments