-
Notifications
You must be signed in to change notification settings - Fork 441
2.1. How to add PE sieve to your Visual Studio project
hasherezade edited this page Mar 7, 2024
·
13 revisions
Once you built PE-sieve as a DLL, adding it to your existing Visual Studio project is easy.
- First you need to add paths for the headers and for the lib.
- In
Project
->Properties
->VC++ Directories
: set two things:- Include Directories (to PEsieve headers)
- Library Directories (to the directory where the
pe-sieve.lib
is)
- Then you need to add
pe-sieve.lib
to the dependencies
- In
Project
->Properties
->Linker
->Input
: Additional Dependencies- add
pe-sieve.lib
- add
- Once everything is added, you can include PE-sieve to your project using:
#include <pe_sieve_api.h>
using namespace pesieve;
To begin, you need to build PE-sieve as a static library. Use pe-sieve.lib
, libpeconv.lib
that were generated during this compilation.
PE-sieve is built as Multi-threaded (/MT
), so the project that is going to use PE-sieve linked statically, must also be compiled in the same mode.
- First you need to add paths for the headers and for the lib.
- In
Project
->Properties
->VC++ Directories
: set two things:- Include Directories (to PEsieve headers)
- Library Directories (to the directory where the
pe-sieve.lib
andlibpeconv.lib
is)
- Then you need to add
pe-sieve.lib
, as well aslibpeconv.lib
to the dependencies
- In
Project
->Properties
->Linker
->Input
: Additional Dependencies- add
pe-sieve.lib
,libpeconv.lib
,sig_finder.lib
- add
- Once everything is added, you can include PE-sieve to your project using:
#define PESIEVE_STATIC_LIB
#include <pe_sieve_api.h>
using namespace pesieve;
It is important to add the macro-definition PESIEVE_STATIC_LIB
before the header is included.