libmem icon indicating copy to clipboard operation
libmem copied to clipboard

Setup environment variables for Windows

Open rdbo opened this issue 1 year ago • 4 comments

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 avatar Dec 05 '23 01:12 rdbo

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 avatar Dec 07 '23 23:12 rdbo

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 avatar Dec 07 '23 23:12 rdbo

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 avatar Dec 08 '23 09:12 rdbo

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

rdbo avatar Jan 02 '24 19:01 rdbo