Installing and using the SDK

There are a couple of folders that you need to copy to the same folder as your source files. One is "Boost Python something", the other I don't remember at the moment... did you do this?
 
Boost-1.32.0 (which has the libs folder containing the problem file it can't load)
Python24

are both in civgamecoredll
 
If you've modded the source files in a different folder than the CvGameCoreDLL, or even in a subfolder, you need to copy those two folders over.
 
Modded ?

I can't get started ! I just can't get Kael's instructions in the first post to work. And the solution in post 182 doesn'tseem to help.
 
Sorry about that. I can only say that the instructions worked for me... hang in there! :)
 
Dear All.
This is the build log I got. Anything I need to worry about here ?

cl : Command line warning D4024 : unrecognized source file type 'EHsc', object file assumed
CvArea.cpp
cl : Command line warning D4027 : source file 'EHsc' ignored
cl : Command line warning D4024 : unrecognized source file type 'EHsc', object file assumed
CvArtFileMgr.cpp
cl : Command line warning D4027 : source file 'EHsc' ignored
cl : Command line warning D4024 : unrecognized source file type 'EHsc', object file assumed
CvCity.cpp
cl : Command line warning D4027 : source file 'EHsc' ignored
cl : Command line warning D4024 : unrecognized source file type 'EHsc', object file assumed
CvCityAI.cpp
cl : Command line warning D4027 : source file 'EHsc' ignored
cl : Command line warning D4024 : unrecognized source file type 'EHsc', object file assumed
CvDLLButtonPopup.cpp
cl : Command line warning D4027 : source file 'EHsc' ignored
cl : Command line warning D4024 : unrecognized source file type 'EHsc', object file assumed
CvDLLEntity.cpp
cl : Command line warning D4027 : source file 'EHsc' ignored
cl : Command line warning D4024 : unrecognized source file type 'EHsc', object file assumed
CvDLLPython.cpp
cl : Command line warning D4027 : source file 'EHsc' ignored
cl : Command line warning D4024 : unrecognized source file type 'EHsc', object file assumed
CvDLLWidgetData.cpp
cl : Command line warning D4027 : source file 'EHsc' ignored
cl : Command line warning D4024 : unrecognized source file type 'EHsc', object file assumed
CvDeal.cpp
cl : Command line warning D4027 : source file 'EHsc' ignored
cl : Command line warning D4024 : unrecognized source file type 'EHsc', object file assumed
CvDiploParameters.cpp
cl : Command line warning D4027 : source file 'EHsc' ignored
cl : Command line warning D4024 : unrecognized source file type 'EHsc', object file assumed
CvFractal.cpp
cl : Command line warning D4027 : source file 'EHsc' ignored
cl : Command line warning D4024 : unrecognized source file type 'EHsc', object file assumed
CvGame.cpp
cl : Command line warning D4027 : source file 'EHsc' ignored
cl : Command line warning D4024 : unrecognized source file type 'EHsc', object file assumed
CvGameAI.cpp
cl : Command line warning D4027 : source file 'EHsc' ignored
cl : Command line warning D4024 : unrecognized source file type 'EHsc', object file assumed
CvGameCoreDLL.cpp
cl : Command line warning D4027 : source file 'EHsc' ignored
Execution of 'rc.exe /IBoost-1.32.0\include /IPython24\include -fo"Final Release Win32\CvGameCoreDLL.res" CvGameCoreDLL.rc' in 'C:\Program Files\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\CvGameCoreDLL' failed.
Nothing to be done.
 
I'm not sure if this is the only problem, but you have to remove "CvGameCoreDLL.rc" from the project. Just "right click" > "remove from project" or something like that.
 
What 77alex77 said, and do step 8, second screenshot again.
 
how do i install code blocks i just come up with binary files according to the site thats what i downloaded but how do I USE these files.
 
I just installed Codeblocks and all the other parts mentioned in the first post. Everything went smoothly, but when I try to build the DLL, Codeblocks aborts with the following error message:

Execution of 'rc.exe /IBoost-1.32.0\include /IPython24\include -fo"Final Release Win32\CvGameCoreDLL.res" CvGameCoreDLL.rc' in 'F:\Games\Civilization 4\Beyond the Sword\CvGameCoreDLL' failed.

Since I have no experience with programming environments, I don't know how to find / fix the error. Any help would be greatly appreciated.

Edit: I see that Pilotis had a similar problem in post #446, so I'll try to remove the rc file from the project. Odd ... I did a forum search for rc.exe as well as 'rc.exe and it didn't find anything ...

Edit2: Interesting ... apparently, CodeBlocks has forgotten several settings, even the defaults. Hrmph. I have no idea how this has happened. I'll uninstall / reinstall and see whether it works this time ...

Edit3: It's working! I guess the problem was really the .rc file that had to be removed from the project, but because I didn't know that (and because of my inexperience) I seem to have messed up something else while looking for possible causes of the problem. Whatever this additional problem was, reinstalling Codeblocks fixed it.

Thanks for the excellent instructions - without them I'd never even thought about installing all this stuff. ;) (Although the removal of the .rc file ought to be mentioned somewhere if it's a problem that several people have?.)
 
This is just for clarification...

If I follow the instructions in the first post, will this create an entirely new .dll file? And will it incorporate any modified C++ files into it? I'm still unsure how to write this into a new .dll file for a mod.
 
Yes on both accounts. Basically, the process described in post #1 does the following:

- Take all the C++ files from the CvGameCoreDLL directory
- Compile a new CvGameCoreDLL.dll, which will work as a replacement of the game's regular file of the same name, out of them
- Write this new file to the directory specified in the project data (in my case, it created a new "Beyond the sword" directory within my "Beyond the sword" directory, I guess I'll change that)
 
I'm getting the message, "fatal error C1083: Cannot open include file: 'windows.h': no such file or directory"

Did I forget to copy a file into my SDK folder, or is the CodeBlocks program just looking for a file that it's not supposed to be looking for?
 
Well I cant get it to work no matter what. I followed the instructions exactly and checked through them many times to make sure i had did it right and I had.

But Whenever I choose to build the file i get the error message instantly

D:\Program Files\Microsoft SDKs\Windows\v6.1\Include\specstrings.h|9|fatal error C1083: Cannot open include file: 'sal.h': No such file or directory|
||=== Build finished: 1 errors, 0 warnings ===|
 
Was someone able to figure out how to get the Debugger to work here ? (On any of the free solutions)

From what i see (DaveMcW very old post - page 7) the problem seem to be some of the Python interface files not compiling with Debug info enabled... My knowledge about Makefiles is about 0 - bever got the whole concept - but would it be possible to compile some sourcefiles with different settings (Skipping the Debug flags on those "evil" interface files ) ?

Edit.: I edited the makefile as described above. It does compile, generate the debug symbol file, link, but the game wont start (Python Failed To Load). I think maybe someone who is not as goof with makefiles (and compiler linke/flags) as i am can make it actually work.
 
I got it working with debugger on a free compiler solution.

On VC++ 2005 Express, not on Codeblocks.
I assume the same could work on Codeblocks, but my installation seem goofed up somehow - the Debugger Executable the codeblocks is supposed to use just does not exist...

Details in the VC++ Compiler Thread
 
I got some problems setting it all up too. Im using Visual Studio 2008 prof.
First of all, upon building, I get just one error: (no modding of any files yet!)
cvunitai.cpp(8561) : error C2065: 'iI' : undeclared identifier
Thats easily solved, but howcome the original source files (beyond the sword) have an error in them?
Well, I can then build the dll just fine, but when launching civ the game crashed on startup. I get an error in the init log file:
[8252.203] DBG: NOT Using XML cache, failed to find crc.dat file

Any help on that?

I just read about removing "CvGameCoreDLL.rc" from the project. Didnt do that yet. Is that important?
 
I just read about removing "CvGameCoreDLL.rc" from the project. Didnt do that yet. Is that important?
It is on the free solutions (VS Express). I dont know about the 2008 pro.

What compiler/makefile you use ?
Compiling it whith the built in compiler in VS2008 will most certainly fail. This is why those insrtuctions to use a 2003 compiler are there.
 
Im using the built in compiler in VS2008.
So is there no way of using my VS? I wouldnt like going back to VS 2003.
 
Top Bottom