• Our friends from AlphaCentauri2.info are in need of technical assistance. If you have experience with the LAMP stack and some hours to spare, please help them out and post here.

Installing and using the SDK

Did anyone tried compile this CvGameCoreDLL under Linux or I'll be first one ?
If anyone did, can you please write what command exactly you use (or which GUI-program did you use)?
 
Why do you want to compile it on linux ?
There is not Civ4 for linux afaik, and the DLL alone will not do you any good without the exe and the rest of the files...

I think for running in Wine a Windows compiled DLL would be best as well, because you will run a Windows compiled exe.
 
I have Wine and installed Civ4 on Linux... And it works... Now I have folder with many .cpp and .h files, I did some changes to this files and now I want to make from this folder CvGameCoreDLL.dll ... Problem is that I can't install SDK Toolkit on Wine ... So I want to know, if somebody compiled it with some linux program ...
 
I don't think so, i am afraid it is not possible.
The civ DLL is very picky about what compiler you use - as you probably gathered from this thread, everything but the specific 2003 compiler will build a useless DLL (even another 'related' MS Visual C++ compilers).

You dont have a windows partition / access to a windows pc to compile it there ?
 
Hello... Please help my sorry noob behind... :cry:

Ok, I followed all the instructions to the T. Everything Kael wrote down in post #1, including the changes suggested by sgerner.

I did have a (minor?) problem with the Platform SDK. I used the first link for it, not the web install, cause I was worried that what MS has on their website right now might be too recent, considering all the issues with apparently having to use a 2003 compiler to make things work (please excuse my use of programming terminology; C++ & SDK etc are not my strong point. I normally reserve myself to futzing with XML).

So, everything seems to be working OK, CodeBlock kicks up a few grammatical erros in the files I changed, which I correct, no biggie. Get all the way to the end, and it throws this at me:

C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib\MSVCRT.lib || fatal error LNK1127: library is corrupt
|| === Build finished: 1 errors, 0 warnings ===

So, I'm confused as all hell, cause I assume everybody else is using the same links from the first post that Kael setup, and I can't find any indication that anyone else has had a problem with a corrupt library... Like I said at the begining: :wallbash:!!!
 
Dresden, thank-you, indeed it had. My file was only 120 kb or so, actual is 421 kb. Yeesh, noob indeed.

New problem though, and I don't think this is the right forum to bring it up... My DLL has now compiled (despite minimal changes it is signifcantly larger than the original) but it doesn't seem to have had the expected effect in-game. Any suggestions as to how I could trouble-shoot this?
 
The larger file will work fine. There's a flag you need to set in the compiler options... I think it's /O2, "Optimize for size" or equivalent.
 
Hi guys,

I've got trouble. If I compile my mod with codeblocks everything seems to fine. The mod is running very well on my machine under Windows XP Pro (32bit). But people that downloaded my mod report a crash if the mod is runnig under Vista. If they run the same files on other machines (for example laptop under XP) everything is okay.

What's going on here? Has anybody an idea?
 
Hi guys,

I've got trouble. If I compile my mod with codeblocks everything seems to fine. The mod is running very well on my machine under Windows XP Pro (32bit). But people that downloaded my mod report a crash if the mod is runnig under Vista. If they run the same files on other machines (for example laptop under XP) everything is okay.

What's going on here? Has anybody an idea?

Vista is a lot pickier than XP. I dont think it has anything to do with codeblocks and is probably a bug in your code that XP ignores.

The classic one is a call on a null object. For example:

Code:
if (gc.getFeatureInfo(pPlot.getFeatureType()).isPermanent())

Will work just fine on XP even if pPlot doesn't have a feature type. Vista crashes when attempting to see if the non-existant feature is permanent.
 
Ok, I just don't get this. I've been through nearly every page, but I just can't figure out what to do! I decided to test it out to see if I knew how to do this by making a DLL for an already existing mod by using the sources for it. Every time I try to build it, Codeblocks finds some error! Is there actually some step by step guide to making the DLL and not just setting up the programs to make it? Because maybe I'm doing something wrong.
 
The instructions in the beginning of the thread are how to build a dll. There is nothing else (besides the tiny detail of knowing C++).

Why don't you try it on the original files (copy of them!) that come with the game first...
 
windows.h would be part of the Platform SDK. Make sure it was downloaded and installed (step #3 of the first post) and make sure the directory it was installed to is added to the include and library settings as in step #6 of the first post.
 
This is odd...

I'm getting this message

Execution of 'rc.exe /IBoost-1.32.0\include /IPython24\include -foDebug\CvGameCoreDLL.res CvGameCoreDLL.rc' in 'C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\Mods\Fictionalization IV\Assets\CvGameCoreDLL' failed.
Nothing to be done.
 
I think you missed to remove the CvGameCoreDLL.rc
 
I feel like I'm missing something obvious, but how exactly do I merge two different dll's? How do I tell which source files have been modified, and which haven't? And the "source files" are all those .cpp files and .h files, right? :p
 
There are tools - http://www.winmerge.org/ - that will show you the differences between two files (or folders), helping merge these.
These tools can not know however, what the code is supposed to do, so you will have to look yourself what the differences are, and which part you would like to keep.

And yes, these .h and .cpp files are the ones you need to merge, before compiling.
 
Back
Top Bottom