First compile no changes but errors

RogerBacon

King
Joined
Nov 16, 2003
Messages
649
EDIT: Never mind. I reinstalled VS 2003 and it compiled the very first time. I guess it just didn't like VS 2010.

Getting back into modding civ and I just loaded up Visual Studio and tried to do a compile of the 3.19 SDK and got some errors. Is this expected behavior?

Some errors are easy to figure out like "int" missing from loop variables. Others are more troubling such as in CvUnitAI.cpp line 8612.
bool bHasHQ = (GET_TEAM(getTeam()).hasHeadquarters((CorporationTypes)iI));

iI is not defined. It is a loop counter just a few lines above but this line is outside of the loop, meaning the variable is already out of scope by the time this line is reached. Here is the loop:
for (int iI = 0; iI < GC.getNumCorporationInfos(); ++iI)
{
if (m_pUnitInfo->getCorporationSpreads((CorporationTypes)iI) > 0)
{
eCorporation = ((CorporationTypes)iI);
break;
}
}

Should I just move it up into the loop? I really expected a clean (no changes ) SDK to compile error-free. :(

EDIT:
If memory serves me correctly, we can only compile in release mode, not debug mode, right?

A second problem file is make_keyword_range_fn.hpp. It doesn't liek the line:
return detail::make_keyword_range_function(objects::make_holder<Arity::value>::template apply<Holder,ArgList>::execute, policies, kw);

Again, this is an unmodified build so I assume everyone encountered this problem.
 
Back
Top Bottom