Hello, please teach how to link a library to a project in Visual Studio. In all textbooks I found only #include directives, but this method does not help me ...
1 answer
Option one. No .lib files. Create a directory in the project directory, transfer the raw files of your library there, and later add them as ExistingItems in the project itself.
Check paths in headers / cpp files, etc. - it may very well be that these files were not supposed to be stored in a single directory, so keep the original directory hierarchy during the transfer.
Compile.
Option two - need .lib. As rightly noted in the comments - for each version of the assembly you need your own version of the library. There are only headers.
Regarding what you have in the comments, you need to specify the following key / NODEFAULTLIB: in the project settings / Linker / CommandLine: (library name from the Errors window). But it may not help. See the whole message - often errors are obtained due to incompatibility of some settings when building a library and building a project, for example, slightly less than everything from the "CodeGeneration" tab))
Kst., Here about dynamic, but interesting))
.lib
file for the release version and the release version, respectively. - Costantino RupertAdditional Library Directories
andAdditional Include Directories
. - Costantino Rupert