[CMake] Linking Error with Visual Studio 2013 x64
Nils Gladitz
nilsgladitz at gmail.com
Thu Apr 17 08:35:36 EDT 2014
On 17.04.2014 14:26, Romain Leguay wrote:
> Visual Studio doesn't work like a good gcc? Because, I try this code
> with mingw (32 and 64) and it's working perfectly.
> Is there some option to export automatically some methods without
> using __declspec(dllexport)?
>
Per default on windows the binutils' linker ld (that is used by mingw)
exports all symbols if none have been exported explicitly:
https://sourceware.org/binutils/docs/ld/Options.html#index-g_t_002d_002dexport_002dall_002dsymbols-287
I wouldn't call it good practice.
If there is an equivalent option for the MSVC linker then I am not aware
of it.
Nils
More information about the CMake
mailing list