Installing and using the SDK

I got the following errors during linking.

What is wrong?

Resolved. (I was sure that I grabbed msvcrt.lib, msvcrtd.lib, and msvcprt.lib, actually I didn't :mischief: ). Sorry for wasting your time.

Yesterday, first time I could compile DLL successfully! :goodjob:
 
I am trying to just build the SDK included with BTS 3.13 (it is included, right? It is the folder CvGameCoreCoreDLL?). I haven't made any changes yet, I'm doing a test first.

I follow all the steps and I keep getting the same error. It seems to start fine and then it just quits all of a sudden with this in the build log:

Project : CvGameCoreDLL
Compiler : Microsoft Visual C++ Toolkit 2003 (called directly)
Directory : C:\Documents and Settings\Faust\Desktop\CvGameCoreDLL\
--------------------------------------------------------------------------------
Switching to target: Final Release
CyArea.cpp
CvArtFileMgr.cpp
CvCity.cpp
CvCityAI.cpp
CvDLLButtonPopup.cpp
CvDLLEntity.cpp
CvDLLPython.cpp
CvDLLWidgetData.cpp
CvDeal.cpp
CvDiploParameters.cpp
CvFractal.cpp
CvGame.cpp
CvGameAI.cpp
CvGameCoreDLL.cpp
Execution of 'rc.exe -fo"Final Release\CvGameCoreDLL.res" CvGameCoreDLL.rc' in 'C:\Documents and Settings\Faust\Desktop\CvGameCoreDLL' failed.
 
OK, I figured this out. The answer is here:

http://forums.civfanatics.com/showthread.php?t=233538

Maybe it should be added as a step to the tutorial, since it won't work (at least not for BTS) as stated in the original post without this step. Resources.h and CvGameCoreDLL.res must be deleted, and in the panel at the left, the file must also be removed from the folder called "Other" (below "Headers")
 
[...]
Execution of 'rc.exe -fo"Final Release\CvGameCoreDLL.res" CvGameCoreDLL.rc' in 'C:\Documents and Settings\Faust\Desktop\CvGameCoreDLL' failed.
Oh, right. I got the same error when I tried to compile the dll the first time. I forgot it. You have to remove "CvGameCoreDLL.rc" from the project. Just "right click" > "remove from project" or something like that.

EDIT: Oh, I have been a bit too late. But I agree: It would be great if this could be added to the initial post.
 
Here are my compiler/linking flags for Visual Studio 2003 (for the Final_Release Configuration).
These give a DLL that is exactly the same size as that shipped by Firaxis.

Compiler:
/O2 /G7 /I "Boost-1.32.0\include" /I "Python24\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "CVGAMECOREDLL_EXPORTS" /D "FINAL_RELEASE" /D "_WINDLL" /D "_MBCS" /FD /EHsc /MD /GR /Yu"CvGameCoreDLL.h" /Fp"Final Release/CvGameCoreDLL.pch" /Fo"Final Release/" /Fd"Final Release/vc70.pdb" /W3 /nologo /c /Zi /Gd /TP

Linker:
/OUT:"../Assets/CvGameCoreDLL.dll" /INCREMENTAL:NO /NOLOGO /LIBPATH:"Python24\libs" /LIBPATH:"boost-1.32.0\libs\\" /DLL /DEBUG /PDB:"Final Release/CvGameCoreDLL.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /IMPLIB:"Final Release/CvGameCoreDLL.lib" /MACHINE:X86 boost_python-vc71-mt-1_32.lib winmm.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ".\Boost-1.32.0\libs\boost_python-vc71-mt-1_32.lib"

Could someone please translate all of the above for an ignorant like me? I can find some of the values, but far from all of them. Yesterday, I managed to compile a working DLL with some changes to some of the source files. However, this DLL is 6,3 MB, so nearly 1,5 MB bigger than an original 3.13 DLL. The changes were not that many, so I'd like to know how to set up the compiler so it makes a smaller DLL.
 
Could someone please provide me insight into these warnings/errors:

cl : Command line warning D4024 : unrecognized source file type 'EHsc', object file assumed
cl : Command line warning D4027 : source file 'EHsc' ignored

culminating in...

fatal error c1067: compiler limit : debug information module size exceeded

It was working (well almost) without these errors before... they crept in quite suddenly and I haven't once been able to run it without these errors

Kevin
 
Hi, I think I need a little help.
I have installed the SDK, the 2003 C++ Toolkit and codeblocks.
I have created a project, followed all other instructions [I am pretty sure correctly] and started a build.
about 5 min into the build I get the following:
-------------- Build: Final Release Win32 in CvGameCoreDLL ---------------

CyCityInterface1.cpp
C:\Program Files\Microsoft Visual C++ Toolkit 2003\include\memory(498) : fatal error C1067: compiler limit : debug information module size exceeded
Process terminated with status 2 (0 minutes, 12 seconds)
1 errors, 0 warnings

Which maybe I am really clueless but I don't understand this error.
Any help from the masses?
 
Gedrin, by default the BTS project has the /Zi (Produce debugging symbols) option enabled. You want to turn that off to get past the compiler limit error:
- under: Project --> Build options...
- in the tab for: Final Release Win 32 --> Compiler Settings --> Other Options
- remove: /Zi

Other deviations from the tutorial that I had to make to get everything to build properly include the following:
1) remove CvGameCoreDLL.rc from the project (you must have already done this though to get this far):
- in the Projects workspace tab go to the directory (Resources) and right click on the CvGameCoreDLL.rc file. Select "Remove from project"
2) remove CvGameCoreLL_DEBUG.pdb from linker:
- under: Projects --> Build options...
- in the tab for: Final Release Win 32 --> Linker Settings --> Other Linker Options
- remove: /pdb:Final Debug Win32\CvGameCoreDLL_DEBUG.pdb
 
If someone is having problems here are A few thing a noticed:

1) they have updata code blocks since this was post so the screen shoot are not exactly right, but close enough.

2) some of the values your ask to change do not appear until you have already tried to compile.

My advise is try to compile then repeat steps 6-8 on the page one like you nevered did them. oh and make sure it is using the right compiler, i click the right one on first startup but it did seem to make it defualt compiler for the project.
 
Alright, mine compiled, but it doesn't give me a dll. It just gives me several .obj files in \CvGameCoreDLL\Final Release Win32. (Using the free method)


EDIT: Oh geez, never mind. I hit a wrong button and sent the file into the depths of my documents folder. I'm fine. >.>
 
Project build:

fatal error LNK1181: cannot open input file 'boost_python-vc71-mt_32.lib'

Newbie slavishly following posted instructions.... help appreciated.

I know there is an earlier post but - well - I just couldn't get my head round it....
 
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! :)
 
Back
Top Bottom