EXEC : FATAL error : Failed to locate boost and python

DandyDev

Chieftain
Joined
Sep 13, 2022
Messages
7
Hi,
I trying to build RaR mod for modification.
When i start debug in Visual Studio 2019, I get an error messages :
Spoiler Output :

Code:
1>EXEC : FATAL error : Failed to locate boost and python
1>Building source list
1>EXEC : FATAL error : Failed to locate boost and python
1>Running fastdep
1>EXEC : FATAL error : Failed to locate boost and python
1>Linking DLL
1>LINK : fatal error LNK1181: cannot open input file 'boost_python-vc71-mt-1_32.lib'
1>NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual C++ Toolkit 2003\bin\link.exe"' : return code '0x49d'
1>Stop.
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command "set TARGET=Debug
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5): error MSB3073: nmake source_list /NOLOGO
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5): error MSB3073: nmake fastdep /NOLOGO
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5): error MSB3073: nmake dll  /NOLOGO" exited with code 2.
1>Done building project "RaR.vcxproj" -- FAILED.

I read threads vGameCoreDLL Build Error boost/python/list.hpp and The Easiest Way to Compile a New DLL. But there not help
I can't setup Visual Studio 2010 from iso.That's why i work in Visual Studio 2022

How fix this errors ?

Thanks and sorry for my bad english
 
Last edited:
Are these here your project files? If so, which changes have you made to them? It looks like you need to change either this variable in the Makefile ...
Code:
## Civ install path
## Path to the directory where boost and python is stored
## Overwritten by enviroment variable CIV4_LIB_INSTALL_PATH
CIV4_PATH=..\..\..\CvGameCoreDLL
... or define CIV4_LIB_INSTALL_PATH in Makefile.project. Your error message seems to originate from here (in the Makefile):
Code:
!IF [IF NOT EXIST "$(BOOST_LIB_PATH)Boost-1.32.0\libs\boost_python-vc71-mt-gd-1_32.lib" EXIT 1] != 0
!MESSAGE FATAL ERROR: Failed to locate boost and python
 
Yes, this files they're alike. I change a variable iTravelTime.
C++:
void CvUnit::sailToAfrica(UnitTravelStates eNewState)
{
    if (!canSailToAfrica(plot()))
    {
        return;
    }

    int iTravelTime =  5 * GC.getEuropeInfo(plot()->getEurope()).getTripLength();

    iTravelTime *= GC.getGameSpeedInfo(GC.getGameINLINE().getGameSpeedType()).getGrowthPercent();
    iTravelTime /= 100;

    for (int iTrait = 0; iTrait < GC.getNumTraitInfos(); ++iTrait)
    {
        TraitTypes eTrait = (TraitTypes) iTrait;
        if (GET_PLAYER(getOwnerINLINE()).hasTrait(eTrait))
        {
            iTravelTime *= 100 + GC.getTraitInfo(eTrait).getEuropeTravelTimeModifier();
            iTravelTime /= 100;
        }
    }
    if (eNewState == NO_UNIT_TRAVEL_STATE)
    {
        switch (getUnitTravelState())
        {
        case NO_UNIT_TRAVEL_STATE:
        case UNIT_TRAVEL_STATE_IN_EUROPE:
        case UNIT_TRAVEL_STATE_IN_PORT_ROYAL:
            eNewState = UNIT_TRAVEL_STATE_TO_AFRICA;
            break;
        case UNIT_TRAVEL_STATE_IN_AFRICA:
            eNewState = UNIT_TRAVEL_STATE_FROM_AFRICA;
            break;
        }
    }

    setUnitTravelState(eNewState, false);
    if (iTravelTime > 0)
    {
        setUnitTravelTimer(iTravelTime);
    }
    else
    {
        setUnitTravelTimer(1);
        doUnitTravelTimer();
        finishMoves();
    }
}
And changes were made to xml and .py resource files but not by me.

Thanks, i have a progress)
I'm define CIV4_LIB_INSTALL_PATH in Makefile.project, and get this output
Code:
1>Building source list
1>Running fastdep
1>Linking DLL
1>   Creating library temp_files\Debug\CvGameCoreDLL.lib and object temp_files\Debug\CvGameCoreDLL.exp
1>CyStructsInterface1.obj : error LNK2001: unresolved external symbol __imp___InterlockedExchange@8
1>CyTeamInterface.obj : error LNK2001: unresolved external symbol __imp___InterlockedExchange@8
1>CyTradeRouteGroupInterface.obj : error LNK2001: unresolved external symbol __imp___InterlockedExchange@8
1>CyTradeRouteInterface.obj : error LNK2001: unresolved external symbol __imp___InterlockedExchange@8
1>CyInfoInterface3.obj : error LNK2001: unresolved external symbol __imp___InterlockedExchange@8
1>CyMapGeneratorInterface.obj : error LNK2019: unresolved external symbol __imp___InterlockedExchange@8 referenced in function "public: virtual void * __thiscall boost::python::objects::caller_py_function_impl<struct boost::python::detail::caller<void (__cdecl*)(struct _object *),struct boost::python::default_call_policies,struct boost::mpl::vector2<void,struct _object *> > >::`scalar deleting destructor'(unsigned int)" (??_G?$caller_py_function_impl@U?$caller@P6AXPAU_object@@@ZUdefault_call_policies@python@boost@@U?$vector2@XPAU_object@@@mpl@4@@detail@python@boost@@@objects@python@boost@@UAEPAXI@Z)
1>CyRandomInterface.obj : error LNK2001: unresolved external symbol __imp___InterlockedExchange@8
1>CySelectionGroupInterface.obj : error LNK2001: unresolved external symbol __imp___InterlockedExchange@8
1>CyGameTextMgrInterface.obj : error LNK2001: unresolved external symbol __imp___InterlockedExchange@8
1>CyHallOfFameInterface.obj : error LNK2001: unresolved external symbol __imp___InterlockedExchange@8
1>CyInfoInterface1.obj : error LNK2001: unresolved external symbol __imp___InterlockedExchange@8
1>CyInfoInterface2.obj : error LNK2001: unresolved external symbol __imp___InterlockedExchange@8
1>CvDLLPython.obj : error LNK2019: unresolved external symbol __imp___InterlockedExchange@8 referenced in function "public: __thiscall boost::detail::lightweight_mutex::scoped_lock::scoped_lock(class boost::detail::lightweight_mutex &)" (??0scoped_lock@lightweight_mutex@detail@boost@@QAE@AAV123@@Z)
1>CyAreaInterface.obj : error LNK2001: unresolved external symbol __imp___InterlockedExchange@8
1>CyArtFileMgrInterface.obj : error LNK2001: unresolved external symbol __imp___InterlockedExchange@8
1>CyDealInterface.obj : error LNK2001: unresolved external symbol __imp___InterlockedExchange@8
1>temp_files\Debug\CvGameCoreDLL.dll : fatal error LNK1120: 1 unresolved externals
1>NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual C++ Toolkit 2003\bin\link.exe"' : return code '0x460'
1>Stop.
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command "set TARGET=Debug
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5): error MSB3073: nmake source_list /NOLOGO
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5): error MSB3073: nmake fastdep /NOLOGO
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5): error MSB3073: nmake dll  /NOLOGO" exited with code 2.
 
Last edited:
I restarted from scratch, trying to follow yours approach from vGameCoreDLL Build Error boost/python/list.hpp.
But ran into another error U1095

Code:
1>Building source list
1>Running fastdep
1>Linking DLL
1>NMAKE : fatal error U1095: expanded command line '"C:\Program Files (x86)\Microsoft Visual C++ Toolkit 2003\VC\bin\link.exe" /out:temp_files\Debug\CvGameCoreDLL.dll /INCREMENTAL /DEBUG /IMPLIB:"temp_files\Debug\CvGameCoreDLL.lib" /DLL /NOLOGO /SUBSYSTEM:WINDOWS /LARGEADDRESSAWARE /TLBID:1 /PDB:"temp_files\Debug\CvGameCoreDLL.pdb"   /IGNORE:4089 /LIBPATH:"D:\RaR-original\CvGameCoreDLL/Python24/libs" /LIBPATH:"D:\RaR-original\CvGameCoreDLL/boost-1.32.0/libs/" boost_python-vc71-mt-1_32.lib /LIBPATH:"C:\Program Files (x86)\Microsoft Visual C++ Toolkit 2003\VC/lib" /LIBPATH:"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A/Lib" winmm.lib user32.lib msvcprt.lib temp_files\Debug\.\CvArea.obj  temp_files\Debug\.\CvArtFileMgr.obj  temp_files\Debug\.\CvCity.obj  temp_files\Debug\.\CvCityAI.obj  temp_files\Debug\.\CvDeal.obj  temp_files\Debug\.\CvDiploParameters.obj  temp_files\Debug\.\CvDLLButtonPopup.obj  temp_files\Debug\.\CvDLLEntity.obj  temp_files\Debug\.\CvDLLPython.obj  temp_files\Debug\.\CvDLLWidgetData.obj  temp_files\Debug\.\CvFractal.obj  temp_files\Debug\.\CvGame.obj  temp_files\Debug\.\CvGameAI.obj  temp_files\Debug\.\CvGameCoreDLL.obj  temp_files\Debug\.\CvGameCoreUtils.obj  temp_files\Debug\.\CvGameTextMgr.obj  temp_files\Debug\.\CvGlobals.obj  temp_files\Debug\.\CvHallOfFameInfo.obj  temp_files\Debug\.\CvInfos.obj  temp_files\Debug\.\CvInfoWater.obj  temp_files\Debug\.\CvInitCore.obj  temp_files\Debug\.\CvMap.obj  temp_files\Debug\.\CvMapGenerator.obj  temp_files\Debug\.\CvPlayer.obj  temp_files\Debug\.\CvPlayerAI.obj  temp_files\Debug\.\CvPlot.obj  temp_files\Debug\.\CvPopupInfo.obj  temp_files\Debug\.\CvPopupReturn.obj  temp_files\Debug\.\CvRandom.obj  temp_files\Debug\.\CvReplayInfo.obj  temp_files\Debug\.\CvReplayMessage.obj  temp_files\Debug\.\CvSelectionGroup.obj  temp_files\Debug\.\CvSelectionGroupAI.obj  temp_files\Debug\.\CvStructs.obj  temp_files\Debug\.\CvTalkingHeadMessage.obj  temp_files\Debug\.\CvTeam.obj  temp_files\Debug\.\CvTeamAI.obj  temp_files\Debug\.\CvTradeRoute.obj  temp_files\Debug\.\CvTradeRouteGroup.obj  temp_files\Debug\.\CvUnit.obj  temp_files\Debug\.\CvUnitAI.obj  temp_files\Debug\.\CvXMLLoadUtility.obj  temp_files\Debug\.\CvXMLLoadUtilityGet.obj  temp_files\Debug\.\CvXMLLoadUtilityInit.obj  temp_files\Debug\.\CvXMLLoadUtilitySet.obj  temp_files\Debug\.\CyArea.obj  temp_files\Debug\.\CyAreaInterface.obj  temp_files\Debug\.\CyArgsList.obj  temp_files\Debug\.\CyArtFileMgr.obj  temp_files\Debug\.\CyArtFileMgrInterface.obj  temp_files\Debug\.\CyCity.obj  temp_files\Debug\.\CyCityInterface1.obj  temp_files\Debug\.\CyCityInterface2.obj  temp_files\Debug\.\CyCityInterface3.obj  temp_files\Debug\.\CyCityInterface4.obj  temp_files\Debug\.\CyCityInterface5.obj  temp_files\Debug\.\CyDeal.obj  temp_files\Debug\.\CyDealInterface.obj  temp_files\Debug\.\CyEnumsInterface.obj  temp_files\Debug\.\CyGame.obj  temp_files\Debug\.\CyGameCoreUtils.obj  temp_files\Debug\.\CyGameCoreUtilsInterface.obj  temp_files\Debug\.\CyGameInterface1.obj  temp_files\Debug\.\CyGameInterface2.obj  temp_files\Debug\.\CyGameInterface3.obj  temp_files\Debug\.\CyGameTextMgr.obj  temp_files\Debug\.\CyGameTextMgrInterface.obj  temp_files\Debug\.\CyGlobalContext.obj  temp_files\Debug\.\CyGlobalContextInterface1.obj  temp_files\Debug\.\CyGlobalContextInterface2.obj  temp_files\Debug\.\CyGlobalContextInterface3.obj  temp_files\Debug\.\CyGlobalContextInterface4.obj  temp_files\Debug\.\CyGlobalContextInterface5.obj  temp_files\Debug\.\CyGlobalContextInterface6.obj  temp_files\Debug\.\CyGlobalContextInterface7.obj  temp_files\Debug\.\CyHallOfFameInfo.obj  temp_files\Debug\.\CyHallOfFameInterface.obj  temp_files\Debug\.\CyInfoInterface1.obj  temp_files\Debug\.\CyInfoInterface2.obj  temp_files\Debug\.\CyInfoInterface3.obj  temp_files\Debug\.\CyMap.obj  temp_files\Debug\.\CyMapGenerator.obj  temp_files\Debug\.\CyMapGeneratorInterface.obj  temp_files\Debug\.\CyMapInterface1.obj  temp_files\Debug\.\CyMapInterface2.obj  temp_files\Debug\.\CyPlayer.obj  temp_files\Debug\.\CyPlayerInterface1.obj  temp_files\Debug\.\CyPlayerInterface2.obj  temp_files\Debug\.\CyPlayerInterface3.obj  temp_files\Debug\.\CyPlayerInterface4.obj  temp_files\Debug\.\CyPlot.obj  temp_files\Debug\.\CyPlotInterface1.obj  temp_files\Debug\.\CyPlotInterface2.obj  temp_files\Debug\.\CyRandomInterface.obj  temp_files\Debug\.\CyReplayInfo.obj  temp_files\Debug\.\CySelectionGroup.obj  temp_files\Debug\.\CySelectionGroupInterface.obj  temp_files\Debug\.\CyStructsInterface1.obj  temp_files\Debug\.\CyTeam.obj  temp_files\Debug\.\CyTeamInterface.obj  temp_files\Debug\.\CyTradeRoute.obj  temp_files\Debug\.\CyTradeRouteGroup.obj  temp_files\Debug\.\CyTradeRouteGroupInterface.obj  temp_files\Debug\.\CyTradeRouteInterface.obj  temp_files\Debug\.\CyUnit.obj  temp_files\Debug\.\CyUnitInterface1.obj  temp_files\Debug\.\CyUnitInterface2.obj  temp_files\Debug\.\FAssert.obj  temp_files\Debug\.\FDialogTemplate.obj  temp_files\Debug\.\_precompile.obj   ' too long
1>Stop.
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command "set TARGET=Debug
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5): error MSB3073: nmake source_list /NOLOGO
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5): error MSB3073: nmake fastdep /NOLOGO
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5): error MSB3073: nmake dll  /NOLOGO" exited with code 2.
1>Done building project "RaR.vcxproj" -- FAILED.
And i try work witch command line and get this :

Code:
D:\RaR-original\Project Files>set TARGET=Debug

D:\RaR-original\Project Files>nmake source_list

Microsoft (R) Program Maintenance Utility Version 14.22.27905.0
Copyright (C) Microsoft Corporation.  All rights reserved.

Building source list
But the errors remain
 
Last edited:
If changes nmake settings Build Command LIne for this :
Code:
set TARGET=Release
nmake clean (not for build)
nmake source_list
nmake fastdep
nmake dll
Then output will be :
Code:
1>
1>Microsoft (R) Program Maintenance Utility Version 14.22.27905.0
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>
1>NMAKE : fatal error U1073: don't know how to make '(not'
1>Stop.
1>
1>Microsoft (R) Program Maintenance Utility Version 14.22.27905.0
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>
1>Building source list
1>
1>Microsoft (R) Program Maintenance Utility Version 14.22.27905.0
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>
1>Running fastdep
1>
1>Microsoft (R) Program Maintenance Utility Version 14.22.27905.0
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>
1>NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual C++ Toolkit 2003\VC\bin\cl.exe' : return code '0x1'
1>Stop.
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5): error MSB3073: The command "set TARGET=Release
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5): error MSB3073: nmake clean (not for build)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5): error MSB3073: nmake source_list
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5): error MSB3073: nmake fastdep
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5): error MSB3073: nmake dll" exited with code 2.
1>Done building project "RaR.vcxproj" -- FAILED.
 
Regarding your first attempt, InterlockedExchange should be defined in winnt.h, so probably the .lib files of the Windows Platform SDK (PSDK) weren't found. I take it that you hadn't set the PSDK and TOOLKIT variables:
Code:
TOOLKIT=$(PROGRAMFILES)\Microsoft Visual C++ Toolkit 2003
PSDK=$(PROGRAMFILES)\Microsoft SDKs\Windows\v7.0A
Using the more recent project files from the thread you linked is not a bad idea, but the original RaR files should work too. If you go with Nightinggale's project files, then the RaR.sln, RaR.vcxproj and all "RaR..." files generated by VS should be removed.

"Expanded command line is too long" is strange; you'd think that Visual Studio can handle long commands. And strange that this didn't happen with the RaR project files, :undecide: I also don't understand why nmake dll fails on the command prompt, with cl.exe returning an error code; seems that cl.exe succeeds when you compile via F7 (Build Solution) and that only link.exe fails in that case. In the error message, it looks like a closing quotation mark is missing
'"C:\Program Files (x86)\Microsoft Visual C++ Toolkit 2003\VC\bin\cl.exe'
but perhaps that's just a problem with the formatting of the error output.
 
I did it !
Thank you very much.
Yes, problem is in TOOLKIT variable, i change the path follow approach, but I had to think a little :crazyeye:
The idea helped me removed project files.The project was started before my work and half files was a replaced with Nightinggale's files. I took his project files and and everything worked.
Might be worth switching to a mod WTS and leave this Frankenstein monster)
 
Great that you figured it out.
Might be worth switching to a mod WTS and leave this Frankenstein monster)
"WTS"? WTP (Nightinggale's mod "We the People")? I suppose the gameplay isn't that different from RaR, and WTP has the benefit of still being developed. Compilation may work a little differently; for one thing, Perl is required.
 
Yes, WTP:)
I have read a changelog, didn't notice any major balance changes. I also think that WTP has the benefit of still being developed. For any questions, you can contact the developer
 
Great that you figured it out."WTS"? WTP (Nightinggale's mod "We the People")? I suppose the gameplay isn't that different from RaR, and WTP has the benefit of still being developed. Compilation may work a little differently; for one thing, Perl is required.
Perl wasn't a problem.Maybe it's already been installed.
 
Hi,
I trying to build RaR mod for modification.
Why are you creating a RaR mod instead of a WTP mod ??? :confused:

WTP is the successor mod of RaR and is both more stable and has more content.
WTP 3.0.1 is basically just the continuation of RaR 2.7 several releases i.e. years of modding more advanced.

------------

Advise:
Please do not waste your time by starting modding based on RaR and directly check out WTP. :thumbsup:

------------

Edit:

Ok, you figured it out yourself already. :thumbsup:

Still wonder sometimes how many old players did not figure out that the mod was "renamed". :dunno:
(Althouhg it has been written / announced in every single public modding forum of RaR we ever had.)
 
Last edited:
For future reference, if there are problems related to We The People, go ask the modders for said mod directly. Everything in that mod is heavily modded and unlike all other mods. I have made a whole lot of changes since I released the Makefile for general use. I haven't released it outside of WTP through as it contains a lot of mod specific hardcoding and can't really be copied to other mods without a lot of work. For this reason I won't recommend general guides on how to compile when wanting to compile WTP.
 
Top Bottom