slice2cpp and LNK1189 with Ice 3.6.2 and VS2013 or 2015
[461/718] Linking CXX shared library components\tools\OmeroCpp\omero-ice.dll FAILED: cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_dll --intdir=components\tools\OmeroCpp\CMakeFiles\omero-ice.dir --manifests -- C:\PROGRA~2\MI0E91~1.0\VC\bin\amd64\link.exe /nologo @CMakeFiles/omero-ice.rsp /out:components\tools\OmeroCpp\omero-ice.dll /implib:components\tools\OmeroCpp\omero-ice.lib /pdb:components\tools\OmeroCpp\omero-ice.pdb /dll /version:5.3 /machine:x64 /debug /INCREMENTAL /INCREMENTAL:NO && cd ." LINK : fatal error LNK1189: library limit of 65535 objects exceeded LINK Pass 1 failed. with 1189 ninja: build stopped: subcommand failed
We had this problem with the upgrade to Ice 3.5, and are now hitting it again with Ice 3.6. The code generated by slice2cpp contains more symbols in the new release, and this breaks creation of the DLL. For Ice 3.5, we were able to split the library into two separate libraries after careful dependency analysis, but this might not be possible to repeat a second time
While it's not a bug, it's definitely a problem! I was wondering if there was any way to reduce the symbol count in the compiled code, either through slice2cpp options or compiler defines when building. For example, is there any "legacy" functionality which we could opt out of using in order to squeeze the slice2cpp-generated code into these symbol count limits?