Where do you store your thirdparty libraries and header files to when developing C/C++ on Windows?
When developing on Linux the package managers usally installs thirdparty libraries to /usr/lib
and /usr/include
. So I know where to look for.
I am just starting to develop on Windows and made the mistake to install libraries to C:\Program Files
which is a bad idea due to UAC and permission lookdown on Windows 10.
Is there some kind of best practice? Thanks in advance
Usually the Python library is located in the site-packages folder within the Python install directory, however, if it is not located in the site-packages folder and you are uncertain where it is installed, here is a Python sample to locate Python modules installed on your computer.
Usually to one of these locations:
Commercial tools might have an installer and if so the location is indeed often Program Files [ (x86) ]
Libraries built from source (for example zlib for compression) go wherever you have your root folder for C++ projects. Using Visual Studio you might have a C: > VS17 folder with one sub-folder for each solution and each partner library. You then reference the H and LIB files using relative paths like ../../other-libraryname/include so that they will work if you move the VS17 library to a new drive or change its name.
In both cases, when building a setup package for deploying to another PC, you typically include only DLL files and code statically linked into your own EXE, you don't include H or LIB files. The default installation location for the setup will be Program Files, but if your third-party library includes COM objects they might recommend installing them to the Windows system32 folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With