[CMake] WINDOWS_EXPORT_ALL_SYMBOLS
Bill Hoffman
bill.hoffman at kitware.com
Tue Jan 26 12:51:57 EST 2016
On 1/26/2016 5:12 AM, Micha Renner wrote:
> It prevents that I can link the library to a program since there is no
> __local_stdio_printf_options etc.
>
> May be there exists an explanation.
>
> Greetings
>
> Michael
>
>
> cmake 3.4.2 Windows 10 VS Express 15
So, I am able to get this to work with Visual Studio 14 2015. CMake 3.4.3
$ cat TLib.dir/Debug/exportall.def
EXPORTS
testCall1_1
__local_stdio_printf_options
_vfprintf_l
vprintf
printf
_vsnprintf_l
vsprintf
Those symbols show up in the .def file but get resolved by system libraries.
Here is my link line:
(output from cmake --build .)
Link:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\link.exe
/ERRORREPORT:QUEUE
/OUT:"C:\Users\hoffman\Documents\BuildDll\BuildDLL-44\src\b\Debug\TLib.dll"
/INCREMENTAL /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib
shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib
/DEF:"TLib.dir\Debug\exportall.def" /MANIFEST
/MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG
/PDB:"C:/Users/hoffman/Documents/BuildDll/BuildDLL-44/src/b/Debug/TLib.pdb"
/SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT
/IMPLIB:"C:/Users/hoffman/Documents/BuildDll/BuildDLL-44/src/b/Debug/TLib.lib"
/MACHINE:X86 /SAFESEH /machine:X86 /debug /DLL TLib.dir\Debug\tlib.obj
You can see I get the dll and .lib file here:
$ ls Debug/
TLib.dll TLib.exp TLib.ilk TLib.lib TLib.pdb
I am running the community edition... Maybe there is some difference
with express?
-Bill
More information about the CMake
mailing list