A simple guide to compiling the DLL

The messagebox appears indeed.

Do you think my problem could be caused by the fact I have both VC2008 and VC2010 installed ?
 
I don't think that's the issue. I have it as well (although I usually debug using VC2005).
Could it be something with steam not allowing debugging? Try asking in the SDK & Python sub forum to see if anyone was able to debug when modding with steam.
 
I can say that I was not able to debug with my Steam version. I don't remember if the game just hanged or if it gave me any errors, but launching the Steam version of Civilization IV from MSVC when in debug mode did not work. Steam probably detects that you are launching the game with another program and suspects that you are trying to alter the game (cheat) in some way and disallows it.
 
hmm, ok. It does make sense.
Thanks to both of you for your help.
 
I haven't tried this myself, but maybe this link will give you some hints.
(Probably the last update is the relevant one, since we're after 2004)
 
hi ASAF.

do you remember of my trouble compiling the cvgamecore?

well i've made some checks for some time and i now i think to have managed to compile the dll. this time i get only one warning:

LINK : warning LNK4089: all references to 'KERNEL32.dll' discarded by /OPT:REF

what did it means?

the sw has compiled the dll?

i have a release folder where is present a cvgamecoredll effectively but is it working? or it's corrupted?

complete output in the attach
 
The_J's right. This warning is harmless and you can ignore it. Your DLL should be fine.

If you want a short explanation take a look here.
 
all right. so all should be fine and i can (FINALLY!) compile my custom dll.

thank for your patience.

i think you're interested of my issue. it was a corrupted exe file in the vctoolkit dir dued to a bad decompression made with winrar instead of 7-zip.when i set my environment i had thought it would be the same but actually wasn't so. stupid issue but equal effective in ruining my compiling. :cry:

i tell you for further reference in other's issue or in the tutorial to avoid the same issue.

bye!:cool:
 
okay. maybe was another the cause of corruption (but i don't know what,i've downloaded from this site painless the various component) anyway it was the corruption of the exe the cause of the failed compiling.
 
hi again ASAf.

i've another question.

i'm trying to keep low the load time of my mod (i've already to load many wonder)
can i compile only my modified component of the cvgamecore or i've to put all the file (.cpp,etc) in the project made to compile the cvgamecoredll ?

i hope the answer is no because there is already the original dir of BTS but maybe the game load only one cvgamecoredll and relative dir and it has to be exhaustive, so i ask to you.

2n option) maybe i can put the cvgamecoredll compiled with all the files (.cpp,etc) but in the dir cvgamecoredll of my mod i can put only the modified component ?

thanks in advance.
 
Assuming I understand you correctly -
The game doesn't load the .cpp files. In fact, you can delete them and the game will run just fine. Their only use is to create the .dll file, and they're not needed by the game itself. So it doesn't matter which you put in the game's folder. The DLL load time will be the same.
And usually the DLL load time is not the bottleneck - it's usually the XML's and graphics.
 
ok thanks.

i don't know if you can help me. btw i ask the same.

do you know how extend the gameplay (i.e. max number of turns of game).
my final goal is to create a mod which starts with the tech of stone cutting, nomadism,etc, you see very simple tech to arrive at the end to future tech as shielding, mech, and so on. but this require the add of 2 eras and the extension of the max number of turns. and if i can ask what do you think would be the appropriate number of turns? 1500?
 
You can do this in XML. I don't remember which exactly (I'm at another computer right now), but you should probably open a new thread in the main C&C forum and ask there.
 
ok i'll do at the right time. now i must focus on the editing of some aspects of the game (diplomacy, powers,...)

the dll compile correctly. thanks
 
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>CvGameCoreDLL.rc(10) : fatal error RC1015: cannot open include file 'afxres.h'.
1>NMAKE : warning U4010: 'Release\CvGameCoreDLL.res' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Release\CvGameCoreDLL.dll' : not all dependents available; target not built
1>NMAKE : warning U4011: 'Release' : not all dependents available; target not built
1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
1>Build log was saved at "file://d:\Civilization 4 editing\Mod Source\Nuova cartella\CvGameCoreDLL\Release\BuildLog.htm"
1>CvGameCoreDLL - 2 error(s), 3 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I'm getting the same error. It seems your link to the Windows SDK is broken, so I tried the SDK v6.0a (comes with VS C++ 2008 Express) and the SDK v6.0 (http://www.microsoft.com/downloads/...6d-c913-4b5c-b87e-ef72e5b4e065&displaylang=en). Both include folders don't have afxres.h though. I'd be grateful if you could point to the correkt SDK. Thanks!
 
Nevermind, I found the correct SDK in the Civ IV Modding Wiki. I was able to compile the BULL DLL for BUG. Thanks for the very good guide Asaf! :goodjob:
 
Back
Top Bottom