C++ Question Error Diagnosis

Hlynkacg

Aspiring rocket scientist
Addon Developer
Tutorial Publisher
Donator
Joined
Dec 27, 2010
Messages
1,868
Reaction score
4
Points
0
Location
San Diego
So every now and then I get the following error that brings my compiling efforts to a screeching halt. It is tied directly to whether or not OrbiterSKD.h is included in a .cpp.

Code:
[COLOR="red"]1>Door.obj : error LNK2005: "void __cdecl calldummy(void)" (?calldummy@@YAXXZ) already defined in AAPO_CSM.obj
1>Door.obj : error LNK2005: _ModuleDate already defined in AAPO_CSM.obj[/COLOR]
1>     Creating library C:\Users\Hlynkacg\Documents\Visual Studio 2010\Projects\AAPO\CSM\Debug\AAPO_CSM.lib and object C:\Users\Hlynkacg\Documents\Visual Studio 2010\Projects\AAPO\CSM\Debug\AAPO_CSM.exp
1>C:\Program Files\Orbiter\Orbiter 2010\Modules\AAPO_CSM.dll : [COLOR="Red"]fatal error LNK1169: one or more multiply defined symbols found[/COLOR]
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I understand the nature of the error in that multiply defined symbols are bad. what I don't understand is that despite including asorted guards against repeatedly including the same *.h (pragma once, #endif, etc...) I'm still getting the same error for all intents and purposes at random. Some compiler runs work others do not.
 
Ahh, the .h file thing is probably it.

I have a bunch of independant .cpp files that each handle a different facet of the vessel, flight model, visuals, cockpit, etc... but they all refer back to a common "MyVessel.h" that contains the vessel's class interface and all the orbitersdk resources.
 
Back
Top