• 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

I tried to use two different CvGameCore.DLLs :

1.) compiled with MS VC++ Express 2005 -> failed. The game CTD after lading screen.
2.) compiled with CodeBlocks and MS VC++ Toolkit 2003 -> OK

Suchy : have you been able to play with that DLL or did you only compile it?

To the GetKeyState : I used seperate installed SDK Platform. Havn't know its part of the Express edition. Will try to use only the inbuilt one.
 
I also got a fatal error when I tried too use the Dll I made with VSE2005, so I guess someones going to have to fix the original problem with "boost::python::detail::make_getter". Looks like it's a problem in the boost code though, maybe the newest version would work.
 
The_Grand_User said:
I also got a fatal error when I tried too use the Dll I made with VSE2005, so I guess someones going to have to fix the original problem with "boost::python::detail::make_getter". Looks like it's a problem in the boost code though, maybe the newest version would work.

I don't think its the make_getter problem. I did compile the dll with the changes Suchy told, using codeblock and VC++ Toolkit 2003 and it seems to work.
 
12monkeys said:
I tried to use two different CvGameCore.DLLs :

1.) compiled with MS VC++ Express 2005 -> failed. The game CTD after lading screen.
2.) compiled with CodeBlocks and MS VC++ Toolkit 2003 -> OK

Suchy : have you been able to play with that DLL or did you only compile it?

To the GetKeyState : I used seperate installed SDK Platform. Havn't know its part of the Express edition. Will try to use only the inbuilt one.

You are right, it crashed for me too.

Maybe Platform SDK is not included in Express edition. In fact I think downloaded version is better to use because it is the latest update, I just didn't get around to install one.
 
The Platform SDK isn't in any version of Visual Studio. As such, you have to download it separately, and then configure the linkage and whatnot in VC++E; if you don't, you get the "windows.h not found" problem.

I'm pretty sure the source of the problem is in the compiler that VC++E uses--the newer 2005 version, as opposed to the 2003 compiler, which is the one that the Codeblocks method uses. I wonder what would happen if you swapped VSE's cl.exe with the Toolkit 2003's version manually...
 
Well I am at my wits end here, I keep getting the same error that ?Eclipse? got a page ago (wonder if he ever resolved it?)

fatal error LNK1181: cannot open input file 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\Lib.obj

I am shure the pathway is correct I pasted it from its installed location. What confuses me is why its trying to open the lib directory as a .obj file? I tried using C:\Program Files\Microsoft Visual C++ Toolkit 2003\Lib\ to try to make it desend into the lib directory but this gives me an even more confusing

canot open input file 'Files\Microsoft.obj'

Code Blocks is clearly insane
 
Impaler[WrG] said:
Well I am at my wits end here, I keep getting the same error that ?Eclipse? got a page ago (wonder if he ever resolved it?)

fatal error LNK1181: cannot open input file 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\Lib.obj

I am shure the pathway is correct I pasted it from its installed location. What confuses me is why its trying to open the lib directory as a .obj file? I tried using C:\Program Files\Microsoft Visual C++ Toolkit 2003\Lib\ to try to make it desend into the lib directory but this gives me an even more confusing

canot open input file 'Files\Microsoft.obj'

Code Blocks is clearly insane

I know I got exactly that error when I tried to install. The issue was I had entered something incorrectly in the codeblocks configuration (so many of the dialog boxes are called the same thing). I wish i could remember exactly which one I entered incorrectly.

I went back and added screenshots at each of the configuration steps in the 1st post, hopefully that helps.
 
Suchy_63 said:
You are right, it crashed for me too.

Maybe Platform SDK is not included in Express edition. In fact I think downloaded version is better to use because it is the latest update, I just didn't get around to install one.

Platform SDK is included in Express Edition as well, but I don't know the version. Anyway, I tried both and the effect is the same -> CTD before engine inits.

So I think there is a global incompatibility between the VC++ 2005 and the VC++ 2003. If found out what that is, we may use the 2005 version.
 
Dianthus said:
Blake said:
I don't think I'll have the tools to compile it (unless it works with that free M$ visual studios toolkit thing), but I'm sure going to read the code.
It looks like the project is a Visual Studio 2003 (or VC7) one. I've compiled it OK and am able to use the dll I built in Civ4.



Kael said:
When I went to open CvGameCoreDLL.vcproj with Visual Studio 2005 it said it needed to convert it from an older version and started the conversion wizard. The conversion failed with the following errors:
I would be surprised if you could get it to work with 2005, since the MFC dlls have completely changed.

Does this help?
 
Suchy_63 said:
You are right, it crashed for me too.

Maybe Platform SDK is not included in Express edition. In fact I think downloaded version is better to use because it is the latest update, I just didn't get around to install one.

I can just confirm that it crashes, too, when I use VC 2005. And the dll is 500 KB smaller.

I'm nevertheless impressed how you solved the compile problem. As I see it there is no direct connection between the error and the code line :confused: .
 
Thank You Dave and Kael!! This is most excellant! Even a newbie like myself, will be able to use this thing! Thanks for taking the time to share this with us!!
 
Lord Olleus said:
I'm having a major problem installing the platform SDK. Everytime I try to instal it I get this error
Code:
Error 1606. Could not access network location
http://download.microsoft.com/download/a/5/f/a5f9d781-e201-4a
b6-8c6a-9bb4efed1e1a/psdk-amd64_0-common.0.cab.

How do i get it to work?
Well, I suggest you dl the iso version - thats worked for me.
 
Finaly it works, I whet in and deleted ALL the stuff in step 6 and re-did it

I think the problem was had entered the directories under Linker->Link Libraries and it was trying to open the directory as a libraby object. Once I removed them I got a sucessfull compile and a .dll file. Other have mentioned it and I noticed it as well that without even altering the sorce code you get a dll that is 4.66 MB vs the normal Civ4 dll of 3 something. I dont notice any game play differences though.

Thanks a bunch everyone out their in tutorial/help thread land!
 
Tried kompiling with VC 2005 and it crashed to desktop aswell. And I have spent some hours now to get it to work.

I have a theory that it should work with if I link with the runtime library from VC2003 toolkit.

I downloaded msvcrtd.lib, msvcrtd.lib and msvcprt.lib I
nstalled the WinSDK and VC2003toolkit and ripped the include dirs from both programs and added those .h files into the solution.
Selected "ignore all default libs" and "ignore standard include path" in VC2005 and after compiling it complains in the linking part on missing references. After adding python24.lib and OLDNAMES.lib in the link list I get two undeclared externals:

___CxxFrameHandler3 (81 references)
__ftol2_sse (7 references)

a little .h file with this content get rid of __ftol2_sse:
extern "C" long _ftol2(double);
extern "C" long _ftol2_sse(double x) { return _ftol2(x); }


So what is ___CxxFrameHandler3 and how can I get rid of it?

Edit: looks like it's an internal member for exception handling, so you have to use VC2003 if you want to use exceptions. Or just disable them in VC2005, but I havent tried that yet.

Edit2: the code uses exception so I think you're stuck with VC2003 until firaxis makes civIV compatible somehow with VC2005-produced dlls
 
Hi guys, need help. Have done well so far but, in the CodeBlocks section, it says to open \CvGameCoreDLL\GameCoreDLL.vj....(some extension).

Now two questions: 1) Where is this file located?
2) Do I open it under 'File', then go to Settings--->Compiler?

Oh, and a 3rd question. I assume that the file is located within the Civ4_SDK_Platform folder. Only problem is that there are two GameCoreDLL files in there, one a C++ Source file, the other a Header file-which do I actually open? Or is there a 3rd one I am unaware of? Hope that all makes sense.

Thanks in advance for any help you can give.

Yours,
Aussie_Lurker.
 
Aussie_Lurker said:
Hi guys, need help. Have done well so far but, in the CodeBlocks section, it says to open \CvGameCoreDLL\GameCoreDLL.vj....(some extension).

Now two questions: 1) Where is this file located?

Its in the SDK from Firaxis/Take2 download (linked int he first post before the quote section). The SDK that is download in the quoted steps is Microsofts SDK.

2) Do I open it under 'File', then go to Settings--->Compiler?

Yeap.
 
Oh, and a 3rd question. I assume that the file is located within the Civ4_SDK_Platform folder. Only problem is that there are two GameCoreDLL files in there, one a C++ Source file, the other a Header file-which do I actually open? Or is there a 3rd one I am unaware of? Hope that all makes sense.

I've had the same trouble. Please help me!

EDIT: I solved it. I just had to change it from "All known files" to "All files"
 
when i do try to do this, doing everything in the first post, with all the programs, i get a folder full of .obj's and CVGAMECOREDLL.layout- how do i get this .dll?:confused:
 
Phantom48 said:
when i do try to do this, doing everything in the first post, with all the programs, i get a folder full of .obj's and CVGAMECOREDLL.layout- how do i get this .dll?:confused:

The vcproj file specifies the output directory as ../assets so go down up one directory and you'll find it in the directory named assets.
 
Back
Top Bottom