[NEED HELP] SDK Compiling Error

Grave

1 Goat = 400 Horses
Joined
May 5, 2002
Messages
1,530
Location
Louisiana
I've got all the C++ files ready to be compiled, and am running into a problem. I followed Kael's directions to a tee in his tutorial, but when I go to build the DLL file I get the following error:

Code:
Project   : CvGameCoreDLL
Compiler  : Microsoft Visual C++ Toolkit 2003 (called directly)
Directory : D:\Games\Sid Meier's Civilization IV\Warlords\CvGameCoreDLL\
--------------------------------------------------------------------------------
Switching to target: Final Release
CvArea.cpp
d:\Games\Sid Meier's Civilization IV\Warlords\CvGameCoreDLL\CvInfos.h(35) : error C2059: syntax error : '--'
d:\Games\Sid Meier's Civilization IV\Warlords\CvGameCoreDLL\CvInfos.h(36) : error C2334: unexpected token(s) preceding ':'; skipping apparent function body
d:\Games\Sid Meier's Civilization IV\Warlords\CvGameCoreDLL\CvInfos.h(39) : error C2760: syntax error : expected '{' not ';'
d:\Games\Sid Meier's Civilization IV\Warlords\CvGameCoreDLL\CvInfos.h(41) : error C2144: syntax error : 'int' should be preceded by '}'
d:\Games\Sid Meier's Civilization IV\Warlords\CvGameCoreDLL\CvInfos.h(4973) : warning C4624: 'CvGameText' : destructor could not be generated because a base class destructor is inaccessible
Process terminated with status 1 (0 minutes, 8 seconds)
4 errors, 1 warnings

Any idea what this means? :mad:
 
Yeah but the problem is these are the default (stock) C++ files... I didn't even mess with them.

I was trying an exercise in compiling... and tried to compile all the default C++ files that came with Warlords (located in Warlords/CvGameCoreDLL directory).

I wanted to see if I could compile the default C++ files before attempting to add my modified C++ files.
 
is this the vanilla or the warlords sdk?
 
That's weird. This is what lines 34 to 40 of CvInfos.h should look like:

Code:
//---------------------------------------PUBLIC INTERFACE---------------------------------
public:

	//constructor
	DllExport CvInfoBase();
	//destructor
	DllExport virtual ~CvInfoBase();

How does that compare to what you've got?
 
PeteT said:
How does that compare to what you've got?

This is my CvInfos.h, lines 34-41:

Code:
//---------------------------------------
---------------------------------
public:

	//constructor
	DllExport CvInfoBase();
	//destructor
	DllExport virtual ~CvInfoBase();
 
GraveEatr said:
Code:
//---------------------------------------
---------------------------------

That's your problem, right there. Take out that line break (you can add in the PUBLIC INTERFACE if you want, but because the // represents a line comment and the second half of that ------ is not on the same line as the comment markers, it's not commented out and is being treated as though it were code. Needless to say, a series of -'s is not valid C++ code.
 
It's that second dashed line. It's not falling within the scope of the comment delimiter "//" and so is causing syntax errors. You could just remove it.

edit: Sometimes you gotta be really fast around here. ;)
 
Cool, thanks guys... I'll try it out.

You'd think the SDK files from Firaxis/2K that were installed straight from the Warlords CD would be error free!
 
Lord Olleus said:
They probably were. I guess that you accidently pressed [ENTER].

Seriously, I didn't mess with them. They were still Read-Only when I first opened them to see what was wrong.
 
Back
Top Bottom