Building a DLL based mod in 2019

whoward69

DLL Minion
Joined
May 30, 2011
Messages
8,699
Location
Near Portsmouth, UK
I was going to title this "Adventures in Obtaining Unobtainium" …

So I've got a shiny new Windows 10 64-bit laptop :)

Steam and Civ V are installed, my mods are installed and I'm playing :) ... I even have the SDK downloaded and FireTuner working ... so I'm also cheating ;)

ModBuddy next. Doesn't run by double-clicking the .exe file :( OK, I'll try it via Steam and the SDK start menu ... completing install ... looks promising ... needs VS-2010 Isolated Shell ... no longer exists on the Microsoft web site.

Let the hunt for unobtanium begin!

Trawling through my old notes, hard-disks and files I find it - much rejoicing :)

But wait, at the back of my mind is something about needing to install VS-2008 first if you want to compile the DLL (and that's the whole point of this particular exercise) …

Yep, in my notes "install VS-2008 before VS-2010 or you need to uninstall VS-2010 to fully install VS-2008"

OK, lets find VS-2008 ... several hours (and much swearing later) ... got it!

VS-2008, despite being only the web-installer, installs perfectly (looks like MS left all the VS-2008 .cab and .msi files on their servers and only removed the web pages to the VS-2008 installer download - please, no one tell them!)

Perfectly? Mmmm. Let's see if the un-modded DLL code will compile. OMG, it does (using the 2008 solution file)

Yeah! Feeling cocky, I install VS-2015 and try to compile DLL-VMC. BOOOO!!! All kinds of errors about missing build tools, but I thought those were in VS-2008.

Hmmmm ... back to the notes. Looks like I also need VS-2010 SP1. Now I know where those are ... in the same backup as VS-2008 (perhaps I'm not as stupid as I look!)

VS-2010 refuses to install ... oh yes, some idiot installed VS-2015 first ... right uninstall VS-2015 …

VS-2010 now installs, and SP1 slips over it easily. Let's see if we can compile the unmodded DLL with VS-2010 (using the 2010 solution) ... YES!!!

Feeling brave, I re-install VS-2015 (you've already guessed this is going to be a mistake, haven't you)

DLL-VMC compiles :) (Quick burst of the "Hallelujah Chorus" can be heard in the background!)

Let's start ModBuddy. Damn, got carried away and forgot the VS-2010 Isolated Shell (which was how I started this wild goose chase!).

Damn! $#*^!!! Won't install. Ooops ... sheepishly ... I installed VS-2015 didn't I …

Uninstall VS-2015 (why does this take so long?), install VS-2010 Isolated Shell. ModBuddy still won't start, something about different patch versions ... reapply VS-2010 SP1.

Oh yeah! Cooking with gas! ModBuddy starts (can't remember exactly what the directories need to be set to, but I can copy those from my old setup later).

Reinstall VS-2015 (third time lucky?) Hoo b****y ray! DLL-VMC still compiles and ModBuddy still works.

So ... I could just stop here, but where's the fun in that? I want VS-2019!

And anybody who guessed that that was going to be another epic just lost :)

VS-2019 downloads and installs first time. So I start it up, open the DLL-VMC 2015 solution file (do NOT OK the dialog that prompts to udate the project, just Cancel it), and it compiles without problem. I'm amazed, I was expecting serious pain!

Now all I have to do is find the time to start modding again.

William

In summary, to build a DLL based mod on a new Windows 10 machine
* Install VS-2008
* Install VS-2010
* Install VS-2010 Isolated Shell
* Install VS-2010 SP1
* Download the Civ V SDK and start ModBuddy from the Steam SDK Menu (to complete the installation)
* Install VS-2015 (optional)
* Install VS-2019
* Open the DLL source and compile it, when prompted to update the project, do NOT click OK, just Cancel
* Start ModBuddy by double-clicking the .exe file
* Start modding :)
 
Last edited:
When I've got the time (hopefully over the weekend), I'll upload all the required installers to my web site so they'll be available for the next 2 and a half years.
 
thanks.
I had a (preinstalled) trial of 2019 installed, but received errors ( https://forums.civfanatics.com/threads/dll-c-tutorial-discussion-thread.516109/page-2#post-15725199 )
Now Installed 2008, 2010, 2010 Isolated and 2010 SP1 from the links bc1 provided.
When I try to open the "CvGameCoreDLL.vs2015.sln" project from whowards dll, it opens without errors, but when trying to build it, it says it cant find "unordered_set" from CvGameCoreDLLPCH.h.
I also tried again with 2019, but there I got the same errors like before when opening.

So I guess I have to install 2015? I found iso links, but the download is whooping 7.1 GB big and I refuse to download such a big file... And I also dont want a "download installer", that is ~2-3 MB big, I just want 2015 Express for C++. Can someone link this?

edit:
btw @whoward69 your picknmix website is currently offline. Did you upload setup files there?

edit2:
I dont have to tell you that this visual studio mess is really frustrating. Are microsoft and dll devs serious with that?! Is this the way it is intended by microsoft?! Shouldn't developers switch to a software that also works after several years ?!
 
Last edited:
...
downloaded 10 GB to install 2015, after long installation time, told me that it cant install c++ because of newer version. deinstalled 2019 and repaired 2015.
But even with 2015 I get the "missing unordered_set file" error when trying to build.
So how do I get this?!
 
You're probably down to "rip it all out, all of it including VS-2008 and any .NET frameworks that were auto-installed, and then re-do it all slowly and in sequence"
 
You're probably down to "rip it all out, all of it including VS-2008 and any .NET frameworks that were auto-installed, and then re-do it all slowly and in sequence"
dont you know in which net framework or service pack or visual studio version this "unordered_set" (or also unordered_map) libraries should be included?
I really dont want to run the 2015 installation again, it took me with download 10 hours, my internet is horrible currently... Or should it also work with 2008 + 2010 (since I get in 2010 and 2015 the same missing library anyway? )
 
dont you know in which net framework or service pack or visual studio version this "unordered_set" (or also unordered_map) libraries should be included?

Why should I? It's a standard MS-VC++ component. It's a bit like me walking up to you and asking "Where does Amanda Britten live? Don't you know where everyone lives in your town?"
 
Why should I? It's a standard MS-VC++ component. It's a bit like me walking up to you and asking "Where does Amanda Britten live? Don't you know where everyone lives in your town?"
Because you are the master of dll :D And therefore I thought you also would have knowledge about c** and dll compiling and therefore also knowledge about Visual Studi and therefore also knowledge how/where all those libraries came from.

But thank you anyway for your reply :)
Maybe someone else can help and when I finaly was able to compile your dll and test few of my changes, I will present them to you and maybe you can implement some multiplayer fixes into your dll then :)
 
SOLVED
guess I found the problem...
I refused to use the link for 2008 from MCG13 above, because it was a "download during install" file, which I absolutely hate, while bc1 link was a complete ISO.
But as MCG13 said, it lacks the Service pack, and thus also the unordered_set and other important files.

I still received alot of "warnings" during building, but it still suceeded now. And first test ingame it seems to work :)
 
Here's my update on this.

I had one mission, and one mission only - to compile whoward's dll code with a small change.
And in my case I started fresh.


1.
Installed Steam, then CV and CV SDK from it.

2.
Installed Visual C++ 2008 Express Edition with Service Pack 1 from MCG13's link above:
http://download.microsoft.com/download/A/5/4/A54BADB6-9C3F-478D-8657-93B3FC9FE62D/vcsetup.exe

3.
Installed Visual C++ 2010 Express Edition from ISO from here:
https://web.archive.org/web/2013081...D5B-426A-A603-1798B951DDAE/VS2010Express1.iso
(slow download though and file is ~700MB, possibly bc1's link above is faster, haven't tested that)

4.
Installed Visual Studio 2010 Isolated Shell (en-US) (required for ModBuddy) from here:
https://visualstudio.microsoft.com/vs/older-downloads/isolated-shell/

5.
Installed Visual Studio 2010 Service Pack 1 from bc1's link:
https://download.cnet.com/Microsoft-Visual-Studio-2010-Service-Pack-1/3001-2070_4-75451099.html

6.
Installed Visual Studio 2019 Community (this is the version I chose for editing and compiling stuff) from here:
https://visualstudio.microsoft.com/downloads/
(during setup I selected from Workloads "Desktop development with C++" only)


Finally downloaded whoward's dll code from git, opened solution in VS2019, edited code, compiled no problem first time. Change works in game. Mission accomplished :)
 
An update from August 2021:

MCG13's link above is now dead, there is a list of older downloads, (including for the isolated shell 2010) however installing this didn't help me - ModBuddy still complained about not having the 2010 isolated shell installed.I found several other .iso downloads floating around microsoft's site but these also all failed until...

I finally found what I was looking for in the new "My Downloads" part of visual studio subscriptions. I had to be signed in to a microsoft account but I could then go to "downloads" and search "shell 2010" and install a the 2010 isolated shell with SP1.
https://my.visualstudio.com/Downloads?q=shell 2010

I can now open ModBuddy successfully, hopefully this may help others find the current download location.
 
An update from August 2021:

MCG13's link above is now dead, there is a list of older downloads, (including for the isolated shell 2010) however installing this didn't help me - ModBuddy still complained about not having the 2010 isolated shell installed.I found several other .iso downloads floating around microsoft's site but these also all failed until...

I finally found what I was looking for in the new "My Downloads" part of visual studio subscriptions. I had to be signed in to a microsoft account but I could then go to "downloads" and search "shell 2010" and install a the 2010 isolated shell with SP1.
https://my.visualstudio.com/Downloads?q=shell 2010

I can now open ModBuddy successfully, hopefully this may help others find the current download location.
Thanks so much, Dysnomian. Can confirm this works in 2022.
 
Just wanted to say thanks WHoward for everything you've ever contributed to the Civ 5 modding community, your work is the pillar on which everything else rests :') <3
 
Good day everyone! I killed three days to install all the necessary Visual Studio on two computers, but I didn't achieve any success)) And I had an idea: can someone help me compile a DLL? I will drop the link to the folder, everything has already been changed there and I will only need the dll file back. Can anyone help?
 
Top Bottom