I'm working on the PC port of my Cocos2dx app and I've run into the error: LINK : fatal error LNK1140: too many modules for program database; link with /PDB:NONE
The PC port was working just fine before, but when I added a new .cpp file or .lib to the solution I've suddenly run into this error. Searching online has brought nothing and it's been a few days.
Although I could turn the PDB:NONE flag on, it would mean that I can't debug on PC anymore.
From the output I've seen from the linker, libcocos2d is included a lot, so I'm thinking that might be the issue? The number of .obj files I have (modules) for my app is around 100. The maximum number is 4095. So the other 4k must be coming from somewhere.
The PDB file is also ridiculously huge (347MB) but I'm not sure if that's because of libcocos2d.
I'm using Cocos2dx 3.8 w/ Visual Studio 2013. I have a feeling there's some setting somewhere in the Linker options that will fix this but I'm unsure.
Help would be greatly appreciated.
Alright so I figured out the answer.
The default cocos2dx win32 project solution consists of:
I removed all of the other projects except my own and added libcocos2d.lib to Linker > Input > Additional Dependencies. The lib consists of all of those other projects.
For debugging I just copied the .dll and .pdb of libcocos2d to the folder. (I'm sure I can automate this later.)
I'm not running into the problem anymore, and my own .pdb (after a clean-build) is now 10MB.