CaterpillarKing
Conqueror of Cacoons
I keep getting an error when I try to load it that says "one or more items failed to load" or something to that effect.
I used Microsoft Visual Studio 2010.
I keep getting an error when I try to load it that says "one or more items failed to load" or something to that effect.
@Snake Pliskeen
Could be this:
https://stackoverflow.com/questions...in-compiling-32-bit-application-in-windows-64
I've had that or a similar error once and adding
#pragma comment(lib, "psapi.lib")
in CvGameCoreDLL.cpp under #include <psapi.h> fixed it for me.[/QUOTE
Thank you so much pal! You saved my day!
I use vs 17, not 2008, just need to adjust some of the files.
I recommend you use kmod mod a a base for modding. There is an make ready and more.
Short answer:The guide here talks about such a thing for the Visual Studio 2010, but maybe the method is different for VS2022 or VS2017.
That all sounds good, I'm getting the same results with those K-Mod files from GitHub – except for the nmake error, i.e. compilation works for me with VS2010. Well, I also had to copy Boost and Python 2.4 to the CvGameCoreDLL folder; no CIVINSTALL variable in that old makefile. But I don't think that's what's causing your error. Are all the files (project files, makefile, .h, .cpp files) in the same folder? This post by Asaf says that the error message means that the makefile can't be located. Edit: Attaching screenshot of folder structure.[...] Here is whats is happening now: [...] the log says the execution encountered an error, and gives this line: "NMAKE : fatal error U1052: file 'Debug' not found".[...]
No idea why the makefile would want to use debug as a file. It sounds really wrong. The newest makefile (to my knowledge) is my own (signature) and I never heard of that issue happening with that one.-Finally, I try to build the solution, I go Debug -> Build Solution and let it run. This is where an error occurs: the log says the execution encountered an error, and gives this line: "NMAKE : fatal error U1052: file 'Debug' not found". Could this have something to do with the makefile I'm using? I am using the makefile found in the k-mod sources I've linked on the other posts, but I made sure to change the path for TOOLKIT and PSDK accordingly.
Fastdep is used to generate a list of which header files each cpp file uses. The compiler will then compile the cpp file if any of the header files has been modified. Without fastdep it will only recompile if the cpp file changes and this will cause issues. You can get around this issue if you use make clean each time as it clears the cache of last compilation. However this forces a complete recompile each time meaning it will be slower. It will however do at least until you manage to compile.-Another problem I encountered was that this makefile by default uses an executable called "fastdep.exe", which seems to be missing in my computer, but once I set this line as a comment disabling it, the error disappeared, so maybe this isn't necessary for the procedure to work.
A small off-topic note about fastdep crashes: I've run into a few of those myself. I had to check in the "depends" file that fastdep generates to see which .cpp was responsible. Then, trial and error removing header inclusions and preprocessor directives. The causes turned out to be pretty random – e.g. the <stack> header as the last included header caused a crash –, so it seems that these are just bugs in fastdep that one has to work around. Fortunately, these issues seem quite rare.[...] Ages ago somebody always had fastdep crashing so I wrote a perl script to do the same thing and I think it is still in Medieval Conquest. I would recommend the exe version though if it works because the perl script is more picky when reading include lines due to being written fairly simple/fast (worse perhaps, but it did work for the mod in question so good enough back then).