By default, nothing is exported from a DLL on Windows. You have to
decorate the code with __declspec(dllexport) or provide a .def file to
specify what gets exported.
Once you've exported something from the library, building it again
will produce a .lib file that you'll be able to link against.
Po
Stephen Collyer wrote:
> When I add a SHARED specifier to the ADD_LIBRARY command for
> the Test library, the exe builds and run fine on Linux, but
> fails at link time when the projects are built under Visual
> Studio, with a message:
>
> LINK : fatal error LNK1104: cannot open file 'Test.lib'
>
I have a trivial project that builds a single executable and
a library against which it links. The source tree looks like:
src/exe/test_prog.cpp
src/lib/Test.cpp, Test.h
When I set up the cmake files to build a static library the
test_prog exe builds and runs fine on both Linux and Win32.
When I