Odd compile error

Chazcon

Prince
Joined
Feb 16, 2006
Messages
476
Location
Left Coast
After compiling many, many, .dll's I suddenly get a syntax error on compile - very strange - happens when I try to compile known good source, including the original unmodified source. I literally built a .dll, made a few changes, and attempted to build again and *poof*. Just to check I attempted to compile the original source, same odd error. Could my compiler install be corrupted? This is a real hair-puller.

Procedure using original code:

1) Install Civ 4 vanilla
2) Patch 1.61
3) Install Warlords
4) Patch 2.08

5) Download SDK (1.61) from Firaxis site
6) Copy & overwrite 1.61 files with Warlords source code from 2.08 patch
7) Create new project & compile - syntax error

g:\Civ Downloads\Mod SDK\CvGameCoreDLL\CvUnit.h(741) : error C2061: syntax error : identifier 'BattleUnitTypes'

Over 100 compiles of vanilla code, no errors. And approx. 10 compiles of Warlords source as I work on a mod, and now this error when I attempt to compile either modified or original source. Ideas?
 
Ahh... I can compile a vanilla 1.61 .dll from scratch. I cannot compile a Warlords 2.08 .dll from scratch - I get the above error.

What I did was to add the Warlords source files to my vanilla project and compile - which worked fine. But when I tried to compile Warlords without my .obj files, error city.

So perhaps I need to edit my makefile...I'll post the final answer here when I figure it out.
 
Civilization IV was written in MS Visual Basic C++ 2003 version - is there any evidence to suggest that Warlords 2.08 was written in a newer version of Visual C++ ? (2005 perhaps?)

Now - those of you who mod the Warlords v.2.08 SDK - what program are you running? Visual C++ 2003 or 2005, Code::Blocks, or another program?

I can't get around this damn syntax error in the Warlords code...
 
Visual Studio 2003 works fine for me.

The struct "BattleUnitTypes" was added in Warlords. Check your CvStructs.h to see if it's there (line 155).

If it is properly defined, try doing a rebuild of the entire solution.
 
Why would you be mixing 2.08 and 1.61 SDK files in this way, just copy the whole CoreDLL package in the Warlords Assets folder (the patch updates it) and compile, no need to touch anything older unless your transfering a modification to 2.08 inwhich case you have to pluck it out very carfully, I recomend winmerge and documenting your changes with tags in the first place to make this easier.
 
OH MY GOD

I have NO business posting on these forums. I need to be taken out back, put against a wall, and shot.

Here's what I did:

- Installed Warlords

- Installed patch 2.08

- Using the (correct) Warlords 2.08 source, I ported over my complete vanilla mod, compiled it, tested it, saved it. Went to bed. However, I CUT the CvGameCoreDLL folder and pasted it into my working folder...

- This morning I had the whole day free to play with code. So up at 0430, make a pot of joe and get to it. I'm going to work on a friends' custom mod today so I need a fresh set of source files. Oh damn, I must of cut the source file folder instead of copying it. No matter, I'll just re-install the Warlords 2.08 patch, that had the source in it. Oops, those are only the files that have changed with the patch... I need to copy those over the full source to get a working set - hey, here's my 1.61 SDK that I have in another folder. i'll just copy the 2.08 files over the 1.61 source and I'm golden...

- 0530 and I still can't get the damn source to compile! What the heck? I'm going NUTS! Fire off a post to MSDN (I am going there next to apologize for wasting THEIR time), fire off PM's to half a dozen Civ4 modders asking for help...

- 1900 and I read this thread after wasting a perfectly good day and half my sanity chasing my tail... and suddenly the light comes on, you who have replied have shown me my mistake.

...it's dark now, and quiet. I'm laying with my face on the tiles, a vacant stare in my eyes, in a puddle of drool and whiskey...a whole day wasted...who knows when I'll get another all to myself...

...I keep mumbling to myself, "karma...karma..."
 
I need to be taken out back, put against a wall, and shot.

If you insist :rolleyes:
 
Well, the part about the whiskey doesn't sound so bad.
But maybe you should drink the whiskey instead of spreading it on the floor.

Matze
 
Back
Top Bottom