I currently have a C++ project that is built using msbuild. Once the project is built I get an exe along with multiple dll files. Is there a way to tell msbuild to link to those libraries statically ? I cannot open the project in visual studio but I can make changes to the vcxproj. Any suggestions on how I can accomplish that ?
In the vcxproj files, change:
<ConfigurationType>DynamicLibrary</ConfigurationType>
To
<ConfigurationType>StaticLibrary</ConfigurationType>
Also, in the PreprocessorDefinitions
section(s), remove xxx_EXPORTS
(where xxx is the name of the project) and _USRDLL
, and replace with _LIB
Note: each of these (including ConfigurationType
) will appear once for each Configuration you have (ie Debug, Release, etc.).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.