Phantom48
Chieftain
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?
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?
c.fe said: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
Suchy_63 said:The dll I got was exactly the same size (in KBs at least, didn't check the bytes) as original. I might play around with it on the weekend to see if there is anything else we can do other than change the compiler.
Suchy_63 said:And I killed most of the easter weekend to get the walkaround, so there is really nothing to be impressed about
Suchy_63 said:One more thing about this, is that it actually crashes when loading XMLs not Python. If you enable logging, you can see that it crashes somewhere in between CIV4BuildInfos.xml and Units/CIV4UnitInfos.xml
talchas said:Well, I suggest you dl the iso version - thats worked for me.
Lord Olleus said:which one? There's three Windows Server 2003 R2 SDK - March 2006 Edition ISO Download, Windows® Server 2003 R2 Platform SDK ISO Download, Windows® Server 2003 SP1 Platform SDK ISO Install.
Also their all .img, what do I use to open them? and how come their 100 times bigger than the other file?
Please help me I am so very confused.
Chieftess said:Since the files are basically text files, you could probably just load each file one by one into another compilier. I'm not sure how compatible a new C++ version DLL (done with 8.0 vs. 7.1) will be, though.
Suchy_63 said:Did some more research on VC8 and SDK. It appears the crash happens because memory footprint of classes generated by VC71 and VC8 is not identical. In particular, the order of methods in virtual method table generated by VC80 is different from what Civilization executable expects.
So the only way to make this work with civ4 executable is by recompiling it with VC8 as well. Since this is not possible, we have to use vc71 compiler.
mjs0 said:It turns out that even though I was using /MD (standard multi-threaded runtime for DLLs) rather than /MDd (debug multi-threaded runtime for DLLs) it was still pulling in one of the debug libraries (msvcprtd.lib).
I have no idea why this was pulled in to the linked DLL so I took the brute force approach of specifically excluding that library and adding the standard equivalent (msvcprt.lib) to the additional dependencies list.
MatzeHH said:Same problem here!
I followed the instructions in post #1 of this thread an use the codeblock editor with the MSVC++ Toolokit 2003 compiler. The linker says: "cannot open file 'msvcprtd.lib'"
Can you tell me how to do this? I cannot find the option to exclude a library.
Matze
Kael said:Do you have a msvcprtd.lib file in your 'C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib' directory?
MatzeHH said:Of cause not. This file is not freely distributed by Microsoft.
But mjs0 was talking about the linker option "Multi-Threaded DLL Runtime Library [/MD]", which should not use the msvcprtd.lib but the msvcprt.lib, which is delivered with the toolkit.
Switching on that linker option did not solve the problem, because the linker still searches the msvcprtd.lib.
He solved that problem by manually excluding the msvcprtd.lib, but didn't tell us, how.
Matze
d80tb7 said:Hello all, just wondering if anybody could help me getting the SDK working in codeblocks.
I've followed all the steps mentioned in the first post: the main problem I have was that I couldn't get msvcrt.lib and msvcrtd.lib as the link given didn't work for me (It kept saying invalid session). I've installed the .Net runtime, but a search of my system doesn't reveal the files. Eventually I found them in an old copy of VS 6 that I found lying around but seeing as this dates from 1998 I'm not sure whether I've installed the right versions.
Anyway, when I try to compile I get lots of errors similar to the following:
_precompile.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall bad_cast::bad_cast(char const *)" (__imp_??0bad_cast@@QAE@PBD@Z)
Does this look like it's something that could be caused by an incorrect version of msvcrt.lib and if so where's the best place to look for it (I'm currently downloading the .Net sdk to see if it is in there). If not, any other clues to what I'm doing wrong would be much appreciated.
Thanks,
Chris
Aussie_Lurker said: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.