• 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

zeroAssoluto, I recommend starting a new topic in this forum for two reasons.

  1. Your question is unrelated to this topic.
  2. People who might be able to answer your question are probably not reading this topic.
 
Sorry to bother you, guys, my first experience with C++ lang, I want to see civ4 cvcoredll file and my project file (taught here by Kael) to compare the difference, so my two question are: can codeblocks compare two coredll files, if so, how can I do it? Thanks in advance.
 
Erghh....I'm sorry, could someone please put this into English? Just all the files I need to download? I just got lost there...:crazyeye:
 
Alright, I hit a snag compiling the 3.02 CvGameCoreDLL source code. I modified the CvDefines file to allow for 34 players instead of the usual 18, and this was the only piece of code altered. All of the appropriate settings were applied, and I began the compile.

It halted at CvGameCoreDLL.cpp with the following error message:

Execution of 'rc.exe -fo"Final Release\CvGameCoreDLL.res" CvGameCoreDLL.rc' in 'C:\Games\Civ4\Beyond the Sword\CvGameCoreDLL' failed.

There's no relevent data anywhere else in the tabs. Can someone give me a suggestion on why the compile failed when only one line was edited in the source code? Any suggestions on how to get around this?

I do have a backup of the original BtS DLL source code for another attempt.

I do have a backup of the original BtS source files elsewhere.

EDIT: I think I got it. I removed the CvGameCoreDLL.rc file from the source directory, and it's compiled past that point in the log so far...

What's the *.rc file, and what does it do?

EDIT 2: I just attempted a compile with the CvGameCoreDLL.rc file, and it reaches a point (presumably after adding the *.cpp files) where it states:

LINK Fatal Error LNK1181: cannot open input file 'Final Release\CvGameCoreDLL.res'

Still need help...
 
It's been a while...but I believe you have to use the resource compiler (rc.exe) to compile the rc file into a res file.
The res file is then used by the linker when generating the dll.

An rc file is a resource definition script file which describes the resources (cursors, bitmaps, fonts, etc) that you want linked into your final executable.
 
Hey Dave. Got a 34 Man DLL compiled. The *.rc and its associated header file in the codeblocks project was messing up the build. I'll keep a backup of that set of sources while I add a couple more things in. Just need two modcomps this time around!
 
I have been trying to get the BtS SDK up and loaded. Now, I managed to get the Warlords SDK loaded, but I seem to be having trouble with the BtS one. I keep getting this error. I for the life of me cannot figure out what the problem is. It seems to just be an unresolved external of "CyPlayerPythonInterface2", but why would that occur and yet everything else work?

Code:
1> "C:/Program Files/Microsoft Visual C++ Toolkit 2003/bin/link.exe" /dll /nologo  /LIBPATH:Python24/libs /LIBPATH:boost-1.32.0/libs/ /LIBPATH:"C:/Program Files/Microsoft Visual C++ Toolkit 2003/lib" /LIBPATH:"C:/Program Files/Microsoft Platform SDK/Lib" /out:Final_Release/CvGameCoreDLL.dll  boost_python-vc71-mt-1_32.lib winmm.lib user32.lib  Final_Release/CvArea.obj Final_Release/CvArtFileMgr.obj Final_Release/CvCity.obj Final_Release/CvCityAI.obj Final_Release/CvDLLButtonPopup.obj Final_Release/CvDLLEntity.obj (...)Final_Release/CySelectionGroupInterface.obj Final_Release/CyStructsInterface1.obj Final_Release/CyTeam.obj Final_Release/CyTeamInterface.obj Final_Release/CyUnit.obj Final_Release/CyUnitInterface1.obj Final_Release/FAssert.obj Final_Release/FDialogTemplate.obj Final_Release/_precompile.obj    /debug /INCREMENTAL:NO /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF 
1>   Creating library Final_Release/CvGameCoreDLL.lib and object Final_Release/CvGameCoreDLL.exp
1>CvDLLPython.obj : error LNK2019: unresolved external symbol "void __cdecl CyPlayerPythonInterface2(class boost::python::class_<class CyPlayer,struct boost::python::detail::not_specified,struct boost::python::detail::not_specified,struct boost::python::detail::not_specified> &)" (?CyPlayerPythonInterface2@@YAXAAV?$class_@VCyPlayer@@Unot_specified@detail@python@boost@@U2345@U2345@@python@boost@@@Z) referenced in function "void __cdecl DLLPublishToPython(void)" (?DLLPublishToPython@@YAXXZ)
1>Final_Release/CvGameCoreDLL.dll : fatal error LNK1120: 1 unresolved externals
1>NMAKE : fatal error U1077: '"C:/Program Files/Microsoft Visual C++ Toolkit 2003/bin/link.exe"' : return code '0x460'
1>Stop.
1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
1>Build log was saved at "file://c:\Documents and Settings\Home\My Documents\Visual Studio 2005\Projects\CvGameCoreDLL\Final_Release\BuildLog.htm"
1>CvGameCoreDLL - 4 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
 
I have been trying to get the BtS SDK up and loaded. Now, I managed to get the Warlords SDK loaded, but I seem to be having trouble with the BtS one. I keep getting this error. I for the life of me cannot figure out what the problem is. It seems to just be an unresolved external of "CyPlayerPythonInterface2", but why would that occur and yet everything else work?

Code:
1> "C:/Program Files/Microsoft Visual C++ Toolkit 2003/bin/link.exe" /dll /nologo  /LIBPATH:Python24/libs /LIBPATH:boost-1.32.0/libs/ /LIBPATH:"C:/Program Files/Microsoft Visual C++ Toolkit 2003/lib" /LIBPATH:"C:/Program Files/Microsoft Platform SDK/Lib" /out:Final_Release/CvGameCoreDLL.dll  boost_python-vc71-mt-1_32.lib winmm.lib user32.lib  Final_Release/CvArea.obj Final_Release/CvArtFileMgr.obj Final_Release/CvCity.obj Final_Release/CvCityAI.obj Final_Release/CvDLLButtonPopup.obj Final_Release/CvDLLEntity.obj (...)Final_Release/CySelectionGroupInterface.obj Final_Release/CyStructsInterface1.obj Final_Release/CyTeam.obj Final_Release/CyTeamInterface.obj Final_Release/CyUnit.obj Final_Release/CyUnitInterface1.obj Final_Release/FAssert.obj Final_Release/FDialogTemplate.obj Final_Release/_precompile.obj    /debug /INCREMENTAL:NO /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF 
1>   Creating library Final_Release/CvGameCoreDLL.lib and object Final_Release/CvGameCoreDLL.exp
1>CvDLLPython.obj : error LNK2019: unresolved external symbol "void __cdecl CyPlayerPythonInterface2(class boost::python::class_<class CyPlayer,struct boost::python::detail::not_specified,struct boost::python::detail::not_specified,struct boost::python::detail::not_specified> &)" (?CyPlayerPythonInterface2@@YAXAAV?$class_@VCyPlayer@@Unot_specified@detail@python@boost@@U2345@U2345@@python@boost@@@Z) referenced in function "void __cdecl DLLPublishToPython(void)" (?DLLPublishToPython@@YAXXZ)
1>Final_Release/CvGameCoreDLL.dll : fatal error LNK1120: 1 unresolved externals
1>NMAKE : fatal error U1077: '"C:/Program Files/Microsoft Visual C++ Toolkit 2003/bin/link.exe"' : return code '0x460'
1>Stop.
1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
1>Build log was saved at "file://c:\Documents and Settings\Home\My Documents\Visual Studio 2005\Projects\CvGameCoreDLL\Final_Release\BuildLog.htm"
1>CvGameCoreDLL - 4 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Exactly the same problem here. Is there any solution?

Edit: I'm going to answer this by myself. Yes, there is a solution and I just found it. Stupid Me thought it could use simply the old makefile unchanged for BtS as well. I had to add CyPlayerPythonInterface2.cpp and CyPlayerPythonInterface2.obj at all appropriate places in my makefile and now it's working.
 
Alright, I hit a snag compiling the 3.02 CvGameCoreDLL source code. I modified the CvDefines file to allow for 34 players instead of the usual 18, and this was the only piece of code altered. All of the appropriate settings were applied, and I began the compile.

It halted at CvGameCoreDLL.cpp with the following error message:

Execution of 'rc.exe -fo"Final Release\CvGameCoreDLL.res" CvGameCoreDLL.rc' in 'C:\Games\Civ4\Beyond the Sword\CvGameCoreDLL' failed.

There's no relevent data anywhere else in the tabs. Can someone give me a suggestion on why the compile failed when only one line was edited in the source code? Any suggestions on how to get around this?

I do have a backup of the original BtS DLL source code for another attempt.

I do have a backup of the original BtS source files elsewhere.

EDIT: I think I got it. I removed the CvGameCoreDLL.rc file from the source directory, and it's compiled past that point in the log so far...

What's the *.rc file, and what does it do?

EDIT 2: I just attempted a compile with the CvGameCoreDLL.rc file, and it reaches a point (presumably after adding the *.cpp files) where it states:

LINK Fatal Error LNK1181: cannot open input file 'Final Release\CvGameCoreDLL.res'

Still need help...

So has this been solved? I got this error when compiling unmodified BTS 3.02 SDK. Please help. Thanks in advance
 
No, not everything. There are somethings that are in the EXE, and at least most of the screens are contained in the python.
 
I've done all of the steps up to compiling the DDL, but when I click build it says, fatal error C1083: cannot open include file: 'windows.h' : no such file or directory

Can someone help me figure out what's wrong?
 
Back
Top Bottom