Build Issues in 3.17-need help

Joined
Jul 21, 2003
Messages
7,807
Location
Adelaide, South Australia
Hi guys, wondering if someone can help me. Am trying to build a new .dll file in v3.17, but get about a dozen of the following error messages at the end:

error LNK2019: Unresolved External Symbol "public: void_thiscall CvGame::

Now, just so you know, I am having no issues with compiling the individual C++ files, and these errors are cropping up even when I use Code::Blocks on the unaltered files. This suggests there might be something missing from the C++ files for v3.17 or that my version of Code::Blocks is out of date.

Has anyone seen this, and can anyone tell me how I can fix this problem?

Thanks in advance.

Aussie.
 
What makefile are you using? There was a file or two added with patch 3.17 and if you are using an older makefile, it may not be compiling everything it needs to.

EDIT: The added file was CvGameInterface.cpp; make sure your Makefile builds CvGameInterface.obj and links it into the DLL
 
Ummm sorry I'm a bit of a novice in these matters. My version of CvGameCoreDLL (a Code::Blocks Project file) is from the 20th of May 2007. Do I need to update the file?

Aussie.
 
Well, if Code::Blocks doesn't use a makefile then I'm not going to be any more help. :p I use Visual Studio 2005 and when I first set it up from one of the tutorials I had a similar error message and the solution was to update my makefile as described above. I was hoping the Code::Blocks setup was similar to Visual Studio but perhaps it's not.

20 May 2007 does sound like it's much earlier than the 3.17 patch. For reference, the newest source files in my 3.17 CvGameCoreDLL directory are from early May 2008 and the CvGameCoreDLL.vcproj file is from 14 April 2008. Perhaps try looking through Kael's SDK topic in the main C&C forum and see if there's anything there about what is needed to update the process for 3.17
 
OK, well mine is Visual Basic C++ Toolkit 2003 by Microsoft. I'm trying to go through the original Tutorial for Code::Blocks (by Kael) and see if setting it up mostly from scratch will help.

Aussie.
 
OK, I've updated my Code::Blocks program, and now I'm getting this error message!

Execution of 'rc.exe -fo"Final Release\CvGameCoreDLL.res" CvGameCoreDLL.rc' in 'C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\Mods\Expanded_Civic_Mod_BtS_3.17\CvGameCoreDLL' failed.

Any idea what this means?

Aussie.
 
I have a makefile for 3.17 in my signature, it should work - if you have a way to use a makefile.

On codeblocks you could try to re-iterate the steps from Kael's tutorial to get a up-to-date codeblocks project. I did it on 3.17 and it works (assuming you start with the clean 3.17 SDK). I don't know how to update a existing one... tho somehow i assume it should be possible.

Your last error is from forgetting to remove the CvGameCoreDLL.rc file.
Find and delete it.
 
Thanks for the advice Refar. Now I'm getting another error message. It says:

LINK.......fatal error LNK1181: cannot open input file 'Final Release\CvGamecoreDLL.res'

I can't even find such a file in either the CvGameCoreDLL folder or in the final release folder. Why would it be doing this?

EDIT: Obviously, though, the other error message isn't popping up anymore.
Aussie.
 
Well... apparently, once Codeblocks "seen" the RC file, it assumes one is there... You would need to tell the linker to not use that .res file.

I don't use codeblocks my self a lot - just tried it once to see if it works - so i am not really sure what you can do there (other that start agaion of course... :( )
Maybe there is someting usefull in the setup screens.
 
Oh this is just getting stupid! I downloaded a completely *new* version of Code::Blocks and set it up in the complete ABSENCE of this .rc file. Yet still it keeps referring to it every time I try and build the blasted .dll file.
Man, I've been using Code::Blocks for over 2 years now and it has NEVER given me this trouble before. What were those Firaxians THINKING OF?!?! Putting in a file which needs to be deleted? This is a massive retrograde step on their part.
I'm at my wits end. If I can't even build the file, then all my efforts cease RIGHT NOW :(!

Aussie.
 
I guess you must be missing something - i have followed Kael/DaveMcW's tutorioa for codeblocks on a clean SDK frm 3.17 and it does work.
 
Hey guys. Thanks for all the help. As it turns out the Makefile option worked fine. I don't know what's wrong with Code::Blocks, but at least I have a compiler that works!

Aussie.
 
Glad to hear you kept on it and it worked out for you.
It's sad to see some modders leave/quit sometimes because of some technical issues being in the way.
 
To be frank, I did too much work to make my Expanded Civic Mod for Warlords to just give up because of a problem with Code::Blocks. If Makefile works, then that's what I'll use. I've already started shifting code across using WinMerge, but CvCity will need to be done manually. Hope to have something-anything-by the end of the week. I just hope the tags work in BtS like they did in Warlords.

Aussie.
 
Top Bottom