rdbo / libmem

Advanced Game Hacking Library for C, Modern C++, Rust and Python (Windows/Linux/FreeBSD) (Process/Memory Hacking) (Hooking/Detouring) (Cross Platform) (x86/x64/ARM/ARM64) (DLL/SO Injection) (Internal/External) (Assembler/Disassembler)
GNU Affero General Public License v3.0
748 stars 90 forks source link

Setup environment variables for Windows #152

Open rdbo opened 7 months ago

rdbo commented 7 months ago

The variables in the title can be used to resolve libmem's include directory and library paths. Setting the %PATH% environment variable has proven to be useless.

rdbo commented 7 months ago

This also can't really work in practice, because you may have 32 bit and 64 bit libraries on your system Also, since there are many runtimes, such as /MT, /MTd, /MDd, etc, you can't just provide a path to a single libmem.lib

rdbo commented 7 months ago

One possible solution is adding environment vars for libmem, such as LIBMEM_DIR, LIBMEM_INCLUDE_DIR, LIBMEM_LIB_DIR And for compiling, you could link against %LIBMEM_LIB_DIR%\libmem-4.4.0-x86_64-windows-msvc\lib\libmem.lib

rdbo commented 7 months ago

NOTE: INCLUDE: adds to the compiler include directory LIB or LIBPATH: not sure yet, but I think the later one adds to the library lookup path

rdbo commented 6 months ago

NOTE: Remember to set libmem-specific environment vars, and use them as lookup directories on Python bindings