Custom files won't compile...but originals will.

Mister Giggles

Warlord
Joined
Mar 19, 2008
Messages
140
Basically, I decided I wanted to combine two mods. While knowing nothing of the underlying programming, I also know good old copy and paste would work.

Of course, things are never so simple...I manage to hit the first changed file (IE, the one changed by the mod), and it hits an error and stops.

So I figured...I screwed up. Just to test to make sure the compiler wasn't broke, I proceeded to compile the original SDK, as in, the one that came with the 3.13 patch. It compiled and works fine.

So I added in (Copy/Pasted) the files from one of the two mods I want to merge into the SDK folder. It bombs at this line with the following error code:

{
int iHealth = std::max(0, GC.getBuildingInfo(eBuilding).getHealth());
iHealth += std::max(0, getBuildingHealthChange((BuildingClassTypes)GC.getBuildingInfo(eBuilding).getBuildingClassType()));
iHealth += std::max(0, GET_PLAYER(getOwnerINLINE()).getExtraBuildingHealth(eBuilding));

return iHealth;
}

The error message itself:

CvCity.cpp|5823|error C2511: 'int CvCity::getBuildingGoodHealth(BuildingTypes) const' : overloaded member function not found in 'CvCity'|

...which is altogether interesting, as this bit of code is a part of Super Spies Mod, which works perfectly.

So I must be doing something wrong...very wrong for it to simply cough up all over custom data that quite obviously works. The quandry here is that I followed the tutorial in getting Codeblocks, the library files, Visual Studio 2003 C++ Toolkit, etc, installed to the letter.

Basically I'm asking if anyone has encountered a similiar problem and has the solution. Even if you need to insult my intelligence and tell me I >did< fail somewhere, be my guest and say it.
 
iHealth += std::max(0, GET_PLAYER(getOwnerINLINE()).getExtraBuildingHealt h(eBuilding));

Notice the space in ...ExtraBuildingHealt h(eBuil... That's where I'll put my money, if that extra space is also in the source files. :)
 
Thank you for the assistance, but it turns out the source included in Super Spies Mod isn't the >complete< source for both Super Spies and the Unofficial Patch. He has it all for Super Spies, but none for the patch.

Once I got the patch's source, I was able to get everything to compile.

Whoo!

Alright, the topic can die now. <.<
 
Back
Top Bottom