A simple guide to compiling the DLL

Are you saying that if you put the original RevDCM DLL file in your mod's Assets folder - it works, and if you use the one that you compiled - it doesn't?

Did you use the RevDCM source files to compile?
Because it seems you're missing the 'CIVILOPEDIA_PAGE_CONCEPT_DCM' value of the 'CivilopediaPageTypes' enum...

It also seems like you're missing a Python file (CvEventInterface), but you should probably ask someone who has modded RevDCM...
 
No, they both do not work. I merely said that it's strange that even if the only thing I do is replace the CvGameCoreDLL.dll of RevDCM with my own, it doesn't work.

No, I didn't... I used the original BTS ones, of your guide... I guess that's the error then, I'll try it perhaps tonight, perhaps tommorow.

RevDCM works perfectly, so how could I miss them... Unless those source files are somehow the cause of that, but as I said, I'll try it with the RevDCM source files either tonight or tommorow. Probably tommorow though.

EDIT

1>------ Build started: Project: CvGameCoreDLL, Configuration: Debug Win32 ------
1>Performing Makefile project actions
1>Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
1>Copyright (C) Microsoft Corporation. All rights reserved.
1> "C:\Program Files (x86)\Microsoft Visual C++ Toolkit 2003\bin\cl.exe" /nologo /MD /Zi /Od /D_DEBUG /RTC1 /Fp"Debug\CvGameCoreDLL.pch" /GR /Gy /W3 /EHsc /Gd /Gm- /DWIN32 /D_WINDOWS /D_USRDLL /DCVGAMECOREDLL_EXPORTS /Yu"CvGameCoreDLL.h" /IBoost-1.32.0/include /IPython24/include /I"C:\Program Files (x86)\Microsoft Visual C++ Toolkit 2003/include" /I"C:\Program Files (x86)\WindowsSDK/Include" /I"C:\Program Files (x86)\WindowsSDK/Include/mfc" /I"C:\Program Files (x86)\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\CvGameCoreDLL\Boost-1.32.0/include" /I"C:\Program Files (x86)\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\CvGameCoreDLL\Python24/include" /YcCvGameCoreDLL.h /Fo"Debug\_precompile.obj" /c _precompile.cpp
1>_precompile.cpp
1>c:\Program Files (x86)\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\NewMod\CvGame.h(513) : error C2143: syntax error : missing ';' before '*'
1>c:\Program Files (x86)\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\NewMod\CvGame.h(513) : error C2071: 'CvGame::CvArtInfoBuilding' : illegal storage class
1>c:\Program Files (x86)\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\NewMod\CvGame.h(513) : error C2501: 'CvGame::getBuildingArtInfo' : missing storage-class or type specifiers
1>c:\Program Files (x86)\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\NewMod\CvGame.h(513) : warning C4183: 'getBuildingArtInfo': missing return type; assumed to be a member function returning 'int'
1>NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual C++ Toolkit 2003\bin\cl.exe"' : return code '0x2'
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:\Program Files (x86)\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\NewMod\Debug\BuildLog.htm"
1>CvGameCoreDLL - 5 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Well... I really don't understand it. The other mod compiles fine with the exact same CvGame.h... Yet this new one doesn't. I guess that could be inteprented as a positive sign, but still...
 
Where did you get the RevDCM source code? Are you sure you copied all the relevant files?

What you have here is a compilation error, which is C++ related.
It is just 1 error (which causes 2 more) which means that the compiler doesn't know what's CvArtInfoBuilding.

I assume the RevDCM files should compile without errors (unless you made changes to them?), but we should probably test it, just to make sure.
 
Sorry to hijack xD, but this is a very good tutorial, many thanks Asaf! I am currently downloading the various programs needed. Just one point of clarification: Say I'm trying to add someone's source code files from a mod component (Afforess's Advanced Diplomacy http://forums.civfanatics.com/showthread.php?t=373463 ), and I'm adding them to a mod (an already modified by me Rise of Mankind 2.4 ) Does this mean I follow method 3? If so, which source code files do I use? the ones from RoM or the modcomp Advanced Diplomacy? The key thing for me is that, the RoM files make a DLL allowing 32 civs playable at a time, and they probably have other important things that the mod relies on...
 
Sorry to hijack xD, but this is a very good tutorial, many thanks Asaf! I am currently downloading the various programs needed. Just one point of clarification: Say I'm trying to add someone's source code files from a mod component (Afforess's Advanced Diplomacy http://forums.civfanatics.com/showthread.php?t=373463 ), and I'm adding them to a mod (an already modified by me Rise of Mankind 2.4 ) Does this mean I follow method 3? If so, which source code files do I use? the ones from RoM or the modcomp Advanced Diplomacy? The key thing for me is that, the RoM files make a DLL allowing 32 civs playable at a time, and they probably have other important things that the mod relies on...

That's no hijack, that's what this thread is meant to be ;)
And thanks :)

Merging code is a complicated task, and sometimes in order to do so properly you have to rewrite some of the code by yourself.
Specifically in this case - isn't Advanced Diplomacy already included in RoM AND? (I haven't played this mod, so I could very well be mistaken).

If this is not the case - I suggest using the one with the most changes (I imagine it's RoM) as your code base (and yes, method 3). It also appears that Advanced diplomacy doesn't have all the source files, so you'll need a full code base anyway.

WinMerge might help you do the actual code merge.

Assuming Advanced diplomacy is based on BTS, then compare the advanced diplomacy code to BTS and there you can see the changes made in it (they're probably already marked with appropriate comments inside the code).

These changes should be merged manually to the RoM code.

Specifically allowing playing more civs is a very minor change - just change the value of MAX_CIV_PLAYERS in CvDefines.h to something else than 18.

If you're interested in some more installations and learning - using version control can help a lot with this kind of merging (see my signature for a tutorial).
 
Where did you get the RevDCM source code? Are you sure you copied all the relevant files?

What you have here is a compilation error, which is C++ related.
It is just 1 error (which causes 2 more) which means that the compiler doesn't know what's CvArtInfoBuilding.

I assume the RevDCM files should compile without errors (unless you made changes to them?), but we should probably test it, just to make sure.
Well, in the RevDCM folder there is a folder called 'source' which contains 7 files, all with .h or .cpp extensions. If you download RevDCM, you automatically have that folder. It ìs the source code, right?
 
Well, in the RevDCM folder there is a folder called 'source' which contains 7 files, all with .h or .cpp extensions. If you download RevDCM, you automatically have that folder. It ìs the source code, right?

Yes, this is the source code, but it is not the entire source code.
You still need to have the BTS codebase, and copy (and override where needed) the RevDCM source files over that.
And I don't think this is the entire RevDCM source code (7 files?)

I'm not on my gaming PC so I can't install RevDCM (why is it an installer anyway???), but I downloaded the RevDCM source files from source forge (there's a link to download all the files at the bottom of the page -"Download GNU tarball"), and it seems that there are many more changed files than just 7...
 
Well, that is strange... But I'll download it, and see wether it works.

EDIT: Well, it returns the same error, and I've tried it 6 times, each in a different way, but all to no avail...
 
Well, that is strange... But I'll download it, and see wether it works.

Just note that I have no idea if the link I sent you is for a stable version.
You'd better consult with one of the RevDCM developers.
 
That's no hijack, that's what this thread is meant to be ;)
And thanks :)

Merging code is a complicated task, and sometimes in order to do so properly you have to rewrite some of the code by yourself.
Specifically in this case - isn't Advanced Diplomacy already included in RoM AND? (I haven't played this mod, so I could very well be mistaken).

If this is not the case - I suggest using the one with the most changes (I imagine it's RoM) as your code base (and yes, method 3). It also appears that Advanced diplomacy doesn't have all the source files, so you'll need a full code base anyway.

WinMerge might help you do the actual code merge.

Assuming Advanced diplomacy is based on BTS, then compare the advanced diplomacy code to BTS and there you can see the changes made in it (they're probably already marked with appropriate comments inside the code).

These changes should be merged manually to the RoM code.

Specifically allowing playing more civs is a very minor change - just change the value of MAX_CIV_PLAYERS in CvDefines.h to something else than 18.

If you're interested in some more installations and learning - using version control can help a lot with this kind of merging (see my signature for a tutorial).

Okay, well thanks a ton! Advanced Diplomacy is indeed in A New Dawn, but I'm currently working on Rise of Mankind 2.4, an older version. I don't know if A New Dawn would work for that version, but I doubt it. I don't know anything about changing the codes or whatnot (that requires C++ knowledge right?), but basically, for the last few weeks I've been editing an old version of RoM that was sitting in my mods folder. I added several leaders, units, and civilizations. (mostly modular) I saw the Advanced Diplomacy modcomp and hoped I could somehow apply it to the RoM mod I'm currently working on. Is there any way I could possibly pull this off, such as downloading A New Dawn and using the files from that? (just the ones that advanced diplomacy would replace) or would I have to actually use winmerge and the Advanced diplomacy + RoM files and try to copy the AD lines over to RoM? If this is true, would I need to know any type of coding? Thanks again!
 
Okay, well thanks a ton! Advanced Diplomacy is indeed in A New Dawn, but I'm currently working on Rise of Mankind 2.4, an older version. I don't know if A New Dawn would work for that version, but I doubt it. I don't know anything about changing the codes or whatnot (that requires C++ knowledge right?), but basically, for the last few weeks I've been editing an old version of RoM that was sitting in my mods folder. I added several leaders, units, and civilizations. (mostly modular) I saw the Advanced Diplomacy modcomp and hoped I could somehow apply it to the RoM mod I'm currently working on. Is there any way I could possibly pull this off, such as downloading A New Dawn and using the files from that? (just the ones that advanced diplomacy would replace) or would I have to actually use winmerge and the Advanced diplomacy + RoM files and try to copy the AD lines over to RoM? If this is true, would I need to know any type of coding? Thanks again!

Yes, you need to know at least some C++ to be able to merge code properly, except for the simplest cases.
I have no idea what other changes there in A New Dawn, but I assume they are not in different files from the AD ones.
You can either try merging it yourself (and learn some C++ while you're doing it) or ask someone to merge the code for you...
 
EDIT: Well, it returns the same error, and I've tried it 6 times, each in a different way, but all to no avail...

Maybe you should attach the source files you're using. I'll see if I can understand what's going on.
 
well thanks again! I will probably request ask somebody to see if they can merge the code for me. Where should I post this request?
 
well thanks again! I will probably request ask somebody to see if they can merge the code for me. Where should I post this request?

In the RoM forums? In the Advanced diplomacy thread? In the SDK/Python thread?
I think people will just tell you to move on to RoM AND...
Wouldn't it be easier to merge your XML and assets changes to RoM AND?
 
Well, ok... This is, I believe, the latest variant.
 

Attachments

  • Hoera.zip
    6.6 MB · Views: 184
Well, I don't know what the 7 files that you found were, and apparently the link I gave you didn't contain the correct files.
When you install RevDCM, you should mark 'RevDCM source' for the files to be installed.
Then copy the source files from the 'RevDCM source' folder in the mod's folder (.cpp and .h files - there should be 116 of these) to a folder you've prepared with BTS 3.19 source files (override the shared ones).

It should compile fine then (you might have a compilation error for line 4099 or something like that in CvGameTextMgr.cpp - just comment out this line).
 
In the RoM forums? In the Advanced diplomacy thread? In the SDK/Python thread?
I think people will just tell you to move on to RoM AND...
Wouldn't it be easier to merge your XML and assets changes to RoM AND?

hmmm, quite possibly. Sorry, I'm basically a noob at this sort of thing... :blush:
Thanks for all the help though!
 
hmmm, quite possibly. Sorry, I'm basically a noob at this sort of thing... :blush:
Thanks for all the help though!

Don't worry about it ;)
You're welcome.
 
Top Bottom