WINDOWS_EXPORT_ALL_SYMBOLS Error LIBTOOMANYMEMBERS:: library limit of number objects exceeded - Need way to filter exports
WINDOWS_EXPORT_ALL_SYMBOLS works great. But with larger libraries (e.g. OMPL; PCL) it hits the msvc limitation (LNK1189) of 65535 symbols per dll. See here: https://msdn.microsoft.com/en-us/library/aa234479(v=vs.60).aspx
Need a way to remove exports from the generated .def file before linking.
Currently cmake runs this in one command.
cmd.exe /C "cmd.exe /C "G:\code\vcpkg\downloads\cmake-3.10.2-win32-x86\bin\cmake.exe -E __create_def G:\code\vcpkg\buildtrees\ompl\x64-windows-dbg\src\ompl\CMakeFiles\ompl.dir\exports.def G:\code\vcpkg\buildtrees\ompl\x64-windows-dbg\src\ompl\CMakeFiles\ompl.dir\exports.def.objs && cd G:\code\vcpkg\buildtrees\ompl\x64-windows-dbg" && G:\code\vcpkg\downloads\cmake-3.10.2-win32-x86\bin\cmake.exe -E vs_link_dll --intdir=src\ompl\CMakeFiles\ompl.dir --manifests -- "E:\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\bin\Hostx64\x64\link.exe" @CMakeFiles/ompl.rsp /out:lib\ompl.dll /implib:lib\ompl.lib /pdb:lib\ompl.pdb /dll /version:0.0 /machine:x64 /DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF /DEF:src\ompl\CMakeFiles\ompl.dir\exports.def && cd ."
Can i somehow hook in an tool that removes entries from the list by matching the name mangling of each exported entry against a list of regex? Eg. to remove lambda functions, stl functions, ..., that are most likely not part of the used dll api?