Created attachment 569 [details] compilation log , with failure on line 4098 Dear colleagues, Trying to compile Geant4 with Qt, OpenGL, XERSES-C, in Debug mode with Visual Studio 2015 (v14) on Windows fails. The compilation fails in Debug mode, but everything is fine in Release or RelWithDebInfo modes. The error is: "LINK : fatal error LNK1189: library limit of 65535 objects exceeded [C:\Users\testeur\Desktop\windows-geant4-installati on-script\build\source\processes\G4processes.vcxproj]" Apparently, this issue is already known but I did not find a thread here (maybe I did not search carefully enough). See : http://hypernews.slac.stanford.edu/HyperNews/geant4/get/installconfig/1778.html I attached the full compilation log (error is displayed line 4098) I would also like to avoid using "RelWithDebInfo" mode because it can be very tricky to debug in some cases (since it is modifying/optimizing the code). And obviously the Release mode does not provide debug capabilities that are very helpful for development. Thanks in advance for the help. -David
Comment on attachment 569 [details] compilation log , with failure on line 4098 First line of the attached file indicates "Compiling and Installing GEANT4 10_04_p03" but it is actually 10_05_p01. It is because I tried with 10_04_03 also before (and it gives the same problem) and I forgot to update it.
Unfortunately there is no workaround for this at the present time. 2019's workplan (https://geant4.web.cern.ch/node/1799) includes a task on modularising libraries which should fix this. That would only be from 10.6 beta (June) however.
OK, thanks for the quick reply. Good luck to the team, and congratulation for the very valuable work that has already been done. -David
A hack to work around this is to specify /Ob1 instead of /Od in cmake cxx flags. This removes most header-inline functions exported, and makes the symbol count much smaller. Of course, inlining functions can interfere with debugging.