I'm using CMake to create a shared library via Visual Studio 2010. The solution outputs a dll file, but not a matching lib file. How do I tell CMake to generate the lib file so I can link other projects to the dll?
相关问题
- Sorting 3 numbers without branching [closed]
- How to compile C++ code in GDB?
- Why does const allow implicit conversion of refere
- How to know full paths to DLL's from .csproj f
- Importing NuGet references through a local project
相关文章
- How to show location of errors, references to memb
- Class layout in C++: Why are members sometimes ord
- How to mock methods return object with deleted cop
- Which is the best way to multiply a large and spar
- How to track MongoDB requests from a console appli
- C++ default constructor does not initialize pointe
- Selecting only the first few characters in a strin
- What exactly do pointers store? (C++)
First of all check that you have at least one exported symbol in your shared library. Visual Studio does not generate the
.lib
file if dll does not exports symbols.Next, check your cmake files - probably you have set
CMAKE_ARCHIVE_OUTPUT_DIRECTORY
variable orARCHIVE_OUTPUT_DIRECTORY
property of the shared library target. If these variable/property is set then Visual Studio will output.lib
files into the different directory specified by that variable/property. (There also can be configuration-specific versions likeARCHIVE_OUTPUT_DIRECTORY_Release
.)