[SDK] Problem with compiling DLL

kine100

Warlord
Joined
May 8, 2010
Messages
153
Hello, everyone..
I'm new for SDK and modding for my own based on 'Dale's combat mod',
and I in trouble to compile the codes.

The settings wouldn't have a problem.
for the test, I tried to compile a dll with original BTS codes only, and it was succeed.
and what I am doing is compile with the codes from the DCM only
and keep getting error messages below.. for 2 days already..

1>------ Build started: Project: CvGameCoreDLL, Configuration: Release Win32 ------
1>Performing Makefile project actions
1> "C:\Program Files (x86)\Microsoft Visual C++ Toolkit 2003\bin\cl.exe" /nologo /MD /O2 /Oy /Oi /G7 /DNDEBUG /DFINAL_RELEASE /Fp"Release\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)\Microsoft SDKs\Windows\v10.0A/Include" /I"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A/Include/mfc" /I"C:\Program Files (x86)\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword\CvGameCoreDLL\Boost-1.32.0/include" /I"C:\Program Files (x86)\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword\CvGameCoreDLL\Python24/include" /FoRelease\CvUnit.obj /c CvUnit.cpp
1>CvUnit.cpp
1>CvUnit.cpp(4549) : error C2065: 'iCount' : undeclared identifier
1>CvUnit.cpp(4550) : error C2065: 'pUnit' : undeclared identifier
1>CvUnit.cpp(4551) : error C2065: 'pUnitNode' : undeclared identifier
1>CvUnit.cpp(4552) : error C3861: 'pUnitNode': identifier not found, even with argument-dependent lookup
1>CvUnit.cpp(4552) : fatal error C1903: unable to recover from previous error(s); stopping compilation
1>NMAKE : warning U4010: 'Release\CvUnit.obj' : build failed; /K specified, continuing ...
1>NMAKE : warning U4011: 'Release\CvGameCoreDLL.dll' : not all dependents available; target not built
1>NMAKE : warning U4011: 'Release' : not all dependents available; target not built
1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"
1>Build log was saved at "file://d:\CIV\CIV4\01_Final_progress\01_TEST_RevDCM\CvGameCoreDLL\Release\BuildLog.htm"
1>CvGameCoreDLL - 6 error(s), 3 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

and the part causes error messages, It is not the original but I never modified at all from the mod.

Code:
// Dale - AB: AI Bombing START
            //Hangar Airbomb START//
            if (GC.getImprovementInfo(pPlot->getImprovementType()).isActsAsCity() && pCity == NULL)
            {
                if (GC.getUnitInfo(getUnitType()).getDCMAirBomb4())
                {
                    iCount = 0;
                    pUnit = NULL;
                    pUnitNode = pPlot->headUnitNode();
                    while (pUnitNode != NULL)
                    {
                        pLoopUnit = ::getUnit(pUnitNode->m_data);
                        pUnitNode = pPlot->nextUnitNode(pUnitNode);
                        if (pLoopUnit->getDomainType() == DOMAIN_SEA)
                        {
                            iCount++;
                        }
                    }
                    if (iCount > 0)
                    {
                        airBomb4(iX, iY);
                    }
                }

Can any one help me to solve this problem or navigate me to what I should do to solve it myself..
Thank you~
 
Code:
1>CvUnit.cpp(4549) : error C2065: 'iCount' : undeclared identifier
1>CvUnit.cpp(4550) : error C2065: 'pUnit' : undeclared identifier
1>CvUnit.cpp(4551) : error C2065: 'pUnitNode' : undeclared identifier
Those are the interesting lines. All you need to do is to tell what kind of variables each are, like this:
PHP:
                   int iCount = 0;
                   // pUnit = NULL; --- not used
                   CLLNode<IDInfo> *pUnitNode = pPlot->headUnitNode();
I think that should do it, but I didn't test it.
 
Code:
1>CvUnit.cpp(4549) : error C2065: 'iCount' : undeclared identifier
1>CvUnit.cpp(4550) : error C2065: 'pUnit' : undeclared identifier
1>CvUnit.cpp(4551) : error C2065: 'pUnitNode' : undeclared identifier
Those are the interesting lines. All you need to do is to tell what kind of variables each are, like this:
PHP:
                   int iCount = 0;
                   // pUnit = NULL; --- not used
                   CLLNode<IDInfo> *pUnitNode = pPlot->headUnitNode();
I think that should do it, but I didn't test it.

Thank you for your answer and I changed the lines and still got error messages,
What I do not understand is I am compiling from the sources I never modified and getting error messages.

This time I got more errors..

1>CvUnit.cpp(12253) : error C2819: type 'CvWString' does not have an overloaded member 'operator ->'
1> d:\CIV\CIV4\01_Final_progress\01_TEST_RevDCM\CvGameCoreDLL\CvString.h(19) : see declaration of 'CvWString'
1> did you intend to use '.' instead?
1>CvUnit.cpp(12253) : error C2227: left of '->getNameKey' must point to class/struct/union
1> type is 'CvWString'
1> did you intend to use '.' instead?
1>CvUnit.cpp(12253) : error C2059: syntax error : ')'
1>CvUnit.cpp(12254) : error C2819: type 'CvWString' does not have an overloaded member 'operator ->'
1> d:\CIV\CIV4\01_Final_progress\01_TEST_RevDCM\CvGameCoreDLL\CvString.h(19) : see declaration of 'CvWString'
1> did you intend to use '.' instead?
1>CvUnit.cpp(12254) : error C2227: left of '->getButton' must point to class/struct/union
1> type is 'CvWString'
1> did you intend to use '.' instead?
1>NMAKE : warning U4010: 'Release\CvUnit.obj' : build failed; /K specified, continuing ...

I changed code to
Code:
// Dale - AB: AI Bombing START
            //Hangar Airbomb START//
            if (GC.getImprovementInfo(pPlot->getImprovementType()).isActsAsCity() && pCity == NULL)
            {
                if (GC.getUnitInfo(getUnitType()).getDCMAirBomb4())
                {
>                  int iCount = 0;
>                  // pUnit = NULL; --- not used
>                  CLLNode<IDInfo> *pUnitNode = pPlot->headUnitNode();
                    while (pUnitNode != NULL)
                    {
                        pLoopUnit = ::getUnit(pUnitNode->m_data);
                        pUnitNode = pPlot->nextUnitNode(pUnitNode);
                        if (pLoopUnit->getDomainType() == DOMAIN_SEA)
                        {
                            iCount++;
                        }
                    }
                    if (iCount > 0)
                    {
                        airBomb4(iX, iY);
                    }
                }
                //Hangar Airbomb START//
                if (GC.getUnitInfo(getUnitType()).getDCMAirBomb6())
                {
>                  int iCount = 0;
>                  // pUnit = NULL; --- not used
>                  CLLNode<IDInfo> *pUnitNode = pPlot->headUnitNode();
                    while (pUnitNode != NULL)
                    {
                        pLoopUnit = ::getUnit(pUnitNode->m_data);
                        pUnitNode = pPlot->nextUnitNode(pUnitNode);
                        if (pLoopUnit->getGroup()->getActivityType() != ACTIVITY_INTERCEPT)
                        {
                            if (pLoopUnit->getDomainType() == DOMAIN_AIR)
                            {
                                iCount++;
                            }
                        }
                    }
                    if (iCount > 0)
                    {
                        airBomb6(iX, iY);
                    }
                }   
            //Hangar Airbomb END//
            }
            // Dale - AB: AI Bombing END

the '>' marks begging of the lines are I added for note on the post.
anyway, thank you very much for your helping me, again.
Have a nice day~ =)
 
Are you using revision 701 from the SVN (link)? Somehow the line numbers in your error messages don't match the ones I'm seeing; e.g the iCount = 0 is in line 5320 when I open CvUnit.cpp in Notepad++ or Visual Studio 2010. So I can't locate the CvWString call in line 12253 of CvUnit.cpp; but as for the first batch of errors, the SVN code looks fine: The three variables are declared at the start of the airBomb function.
Code:
int iI, iCount = 0;
CvUnit* pUnit = NULL;
CLLNode<IDInfo>* pUnitNode;
Are these lines in your file? Unfortunately, I can't try to compile it myself right now.http://svn.code.sf.net/p/revolutiondcm/code/Trunk/SourceCode/CvGameCoreDLL/CvUnit.cpp

I guess you could always try the code version that comes with the RevDCM installer. To quote from the RevDCM thread:
Instructions for accessing SVN development versions: (NOTE: these versions contain bugs and are not supported until officially released)
 
Are you using revision 701 from the SVN (link)? Somehow the line numbers in your error messages don't match the ones I'm seeing; e.g the iCount = 0 is in line 5320 when I open CvUnit.cpp in Notepad++ or Visual Studio 2010. So I can't locate the CvWString call in line 12253 of CvUnit.cpp; but as for the first batch of errors, the SVN code looks fine: The three variables are declared at the start of the airBomb function.
Code:
int iI, iCount = 0;
CvUnit* pUnit = NULL;
CLLNode<IDInfo>* pUnitNode;
Are these lines in your file? Unfortunately, I can't try to compile it myself right now.

I guess you could always try the code version that comes with the RevDCM installer. To quote from the RevDCM thread:

Thanks a lot for sharing your time and knowledge.
I will try it to night~!!
Have a nice week~!!
 
Are you using revision 701 from the SVN (link)? Somehow the line numbers in your error messages don't match the ones I'm seeing; e.g the iCount = 0 is in line 5320 when I open CvUnit.cpp in Notepad++ or Visual Studio 2010. So I can't locate the CvWString call in line 12253 of CvUnit.cpp; but as for the first batch of errors, the SVN code looks fine: The three variables are declared at the start of the airBomb function.
Code:
int iI, iCount = 0;
CvUnit* pUnit = NULL;
CLLNode<IDInfo>* pUnitNode;
Are these lines in your file? Unfortunately, I can't try to compile it myself right now.

I guess you could always try the code version that comes with the RevDCM installer. To quote from the RevDCM thread:

Dear, f1rpo..
I tried it and it just build a BuildLog.htm and.. that's it..

Below is the message I got in output window.

1>------ Build started: Project: CvGameCoreDLL, Configuration: Release Win32 ------
1>Performing Makefile project actions
1>'Release' is up-to-date
1>Build log was saved at "file://d:\CIV\CIV4\02_SDK_RevDCM\CvGameCoreDLL\Release\BuildLog.htm"
1>CvGameCoreDLL - 0 error(s), 0 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

I didn't make a change in DLL sources and I think there shouldn't be a problem.

What I did was copying the CvGameCoreDLL folder from the original BTS and added ReVDCM C++ sources in the folder.
I added 'CvGameCoreDLL.sln' and 'CvGameCoreDLL.vcproj' but a file named depend.
Open the 'CvGameCoreDLL.sln' and drop down debug to Release and, Build -> Build solution.
I did exactly what Asaf's post 'A simple guide to compiling the DLL says, I follow the 3rd option.

I may be doing something wrong or missed it which I am not able to figure out.

Below is the changes I made on Makefile and it looks ok..

Code:
### Variables used in this Makefile
TOOLKIT=C:/Program Files (x86)/Microsoft Visual C++ Toolkit 2003
PSDK=C:/Users/Program Files (x86)/WindowsSDK

#uncomment, if you want new dlls copied to your mod's Assets folder automatically
YOURMOD=C:/Program Files (x86)/Firaxis Games/Sid Meier's Civilization 4 Complete/Beyond the Sword/Mods/MyDCM

This time, no errors and no dll, too.. :crazyeye::crazyeye::crazyeye:
Thanks for sharing your time, again.
 
What I did was copying the CvGameCoreDLL folder from the original BTS and added ReVDCM C++ sources in the folder.
Good catch:
some mods only publish the source files which they have changed
That's the case with RevDCM. And then Asaf's files should be copied last, overwriting the Makefile that comes with RevDCM. Are you sure you're using Asaf's Makefile? Just wondering because you didn't mention setting the CIVINSTALL path. If you have the right Makefile, you could try removing the Release folder (if there even is one); perhaps then make will realize that the release is not "up-to-date".

Btw, I don't think the files from the SVN are usable. Looks like someone wanted to merge K-Mod into RevDCM and gave up halfway. E.g. CvCity.cpp calls the K-Mod function addHumanMessage, but the definition, which should be in CvDLLInterfaceIFaceBase.h, is missing; that file isn't even on their SVN. The source code from the installer (RevDCM 2.9) looks OK though.

Thanks for sharing your time, again.
I see you've been at this for quite some time already. Really hope you can get it to work in the end.
 
Last edited:
Good catch:That's the case with RevDCM. And then Asaf's files should be copied last, overwriting the Makefile that comes with RevDCM. Are you sure you're using Asaf's Makefile? Just wondering because you didn't mention setting the CIVINSTALL path. If you have the right Makefile, you could try removing the Release folder (if there even is one); perhaps then make will realize that the release is not "up-to-date".

Btw, I don't think the files from the SVN are usable. Looks like someone wanted to merge K-Mod into RevDCM and gave up halfway. E.g. CvCity.cpp calls the K-Mod function addHumanMessage, but the definition, which should be in CvDLLInterfaceIFaceBase.h, is missing; that file isn't even on their SVN. The source code from the installer (RevDCM 2.9) looks OK though.

I see you've been at this for quite some time already. Really hope you can get it to work in the end.

Thank you for your informing.
I used the makefile included in the RevDCM folder.
I should try compile with Asaf's Makefile
Some day.. it would work... hopefully...
Have nice weekend~!
 
Good catch:That's the case with RevDCM. And then Asaf's files should be copied last, overwriting the Makefile that comes with RevDCM. Are you sure you're using Asaf's Makefile? Just wondering because you didn't mention setting the CIVINSTALL path. If you have the right Makefile, you could try removing the Release folder (if there even is one); perhaps then make will realize that the release is not "up-to-date".

Btw, I don't think the files from the SVN are usable. Looks like someone wanted to merge K-Mod into RevDCM and gave up halfway. E.g. CvCity.cpp calls the K-Mod function addHumanMessage, but the definition, which should be in CvDLLInterfaceIFaceBase.h, is missing; that file isn't even on their SVN. The source code from the installer (RevDCM 2.9) looks OK though.

I see you've been at this for quite some time already. Really hope you can get it to work in the end.

I tried with Asaf's Makefile and it didn't work too.

and I got more errors.. :crazyeye::shifty::eek::cry::crazyeye:

1>CvGameCoreDLL - 113 error(s), 108 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Guess I am going to spend my weekend for finding a solution~!!!:lol::lol::lol:

Even though I got more errors and failed to compile, I feel I am getting closer to the answer and sdk something..

Below is my make file
hope I made wrong and that is the key to the solution~!!


Code:
#### Civilization 4 SDK Makefile 1.0 ####
####  Copyright 2010 Danny Daemonic  ####
#########################################

#### Paths ####
TOOLKIT=C:\Program Files (x86)\Microsoft Visual C++ Toolkit 2003
PSDK=C:\Program Files (x86)\WindowsSDK
CIVINSTALL=C:\Program Files (x86)\2K Games\Firaxis Games\Sid Meier's Civilization 4 Complete\Beyond the Sword
GLOBALBOOST=$(CIVINSTALL)\CvGameCoreDLL\Boost-1.32.0
GLOBALPYTHON=$(CIVINSTALL)\CvGameCoreDLL\Python24
## Uncomment to have newly compiled dlls copied to your mod's Assets directory
#YOURMOD=$(CIVINSTALL)\Mods\MyMod

#### Tools ####
CC="$(TOOLKIT)\bin\cl.exe"
CPP="$(TOOLKIT)\bin\cl.exe"
LD="$(TOOLKIT)\bin\link.exe"
RC="$(PSDK)\bin\rc.exe"
## Uncomment to build dependencies using fastdep
FD="$(MAKEDIR)\bin\fastdep.exe"

#### BLACKLIST ####
## Uncomment to block CvTextScreen (accidentally included by Firaxis)
BLACKLIST=CvTextScreens

#### You shouldn't need to modify anything beyond this point ####
#################################################################

#### Target Files ####
Debug_BIN=Debug\CvGameCoreDLL.dll
Release_BIN=Release\CvGameCoreDLL.dll

!IF [IF NOT EXIST CvGameCoreDLL.rc EXIT 1] == 0
Debug_RESOURCE=Debug\CvGameCoreDLL.res
Release_RESOURCE=Release\CvGameCoreDLL.res
!ENDIF

Debug_STATICLIB=Debug\CvGameCoreDLL.lib
Release_STATICLIB=Release\CvGameCoreDLL.lib

Debug_LIBDEF=Debug\CvGameCoreDLL.def
Release_LIBDEF=Release\CvGameCoreDLL.def

Debug_PCH=Debug\CvGameCoreDLL.pch
Release_PCH=Release\CvGameCoreDLL.pch

Debug_PDB=Debug\CvGameCoreDLL.pdb
Release_PDB=Release\CvGameCoreDLL.pdb

Debug_OTHER=Debug\CvGameCoreDLL.exp Debug\CvGameCoreDLL.ilk
Release_OTHER=Release\CvGameCoreDLL.exp

#### CFLAGS ####
GLOBAL_CFLAGS=/GR /Gy /W3 /EHsc /Gd /Gm- /DWIN32 /D_WINDOWS /D_USRDLL /DCVGAMECOREDLL_EXPORTS /Yu"CvGameCoreDLL.h"
Debug_CFLAGS=/MD /Zi /Od /D_DEBUG /RTC1 /Fp"$(Debug_PCH)" $(GLOBAL_CFLAGS)
Release_CFLAGS=/MD /O2 /Oy /Oi /G7 /DNDEBUG /DFINAL_RELEASE /Fp"$(Release_PCH)" $(GLOBAL_CFLAGS)

#### LDFLAGS ####
GLOBAL_LDFLAGS=/DLL /NOLOGO /SUBSYSTEM:WINDOWS /LARGEADDRESSAWARE /TLBID:1
Debug_LDFLAGS=/INCREMENTAL /DEBUG /PDB:"$(Debug_PDB)" /IMPLIB:"$(Debug_STATICLIB)" $(GLOBAL_LDFLAGS)
Release_LDFLAGS=/INCREMENTAL:NO /OPT:REF /OPT:ICF /PDB:"$(Release_PDB)" $(GLOBAL_LDFLAGS)

#### INCLUDES ####
GLOBAL_INCS=/I"$(TOOLKIT)/include" /I"$(PSDK)/Include" /I"$(PSDK)/Include/mfc" /I"$(GLOBALBOOST)/include" /I"$(GLOBALPYTHON)/include"
PROJECT_INCS=/IBoost-1.32.0/include /IPython24/include
Debug_INCS=$(PROJECT_INCS) $(GLOBAL_INCS)
Release_INCS=$(PROJECT_INCS) $(GLOBAL_INCS)

#### LIBS ####
GLOBAL_LIBS=/LIBPATH:"$(TOOLKIT)/lib" /LIBPATH:"$(PSDK)/Lib"  /LIBPATH:"$(GLOBALBOOST)/libs" /LIBPATH:"$(GLOBALPYTHON)/libs" winmm.lib user32.lib
PROJECT_LIBS=/LIBPATH:Python24/libs /LIBPATH:boost-1.32.0/libs/ boost_python-vc71-mt-1_32.lib
Debug_LIBS=$(PROJECT_LIBS) $(GLOBAL_LIBS) msvcprt.lib
Release_LIBS=$(PROJECT_LIBS) $(GLOBAL_LIBS)

#### Objects ####
Debug_LINKOBJS=$(Debug_OBJS)
Release_LINKOBJS=$(Release_OBJS)

#### Auto SOURCES/OBJS ####
!IF [ECHO SOURCES= \> sources.mk] == 0 && \
    [FOR %i IN (*.cpp) DO @ECHO. "%i" \>> sources.mk] == 0 && \
    [ECHO.>> sources.mk] == 0 && \
    [ECHO Debug_OBJS= \>> sources.mk] == 0 && \
    [FOR /F "delims=." %i IN ('dir /b *.cpp') DO @ECHO. Debug\%i.obj \>> sources.mk] == 0 && \
    [ECHO.>> sources.mk] == 0 && \
    [ECHO Release_OBJS= \>> sources.mk] == 0 && \
    [FOR /F "delims=." %i IN ('dir /b *.cpp') DO @ECHO. Release\%i.obj \>> sources.mk] == 0 && \
    [ECHO.>> sources.mk] == 0
!INCLUDE sources.mk
!IF [DEL sources.mk]
!ENDIF
!ENDIF

#### Targets ####
#################

.PHONY: all clean Debug_clean Release_clean Debug Release

all: Debug Release

clean: Debug_clean Release_clean

Debug_clean:
    @FOR %i IN ($(Debug_BIN) $(Debug_STATICLIB) $(Debug_LIBDEF) \
        Debug\*.obj Debug\*.@ $(Debug_RESOURCE) \
        $(Debug_PCH) $(Debug_PDB) $(Debug_OTHER)) DO @IF EXIST "%i" DEL "%i"

Release_clean:
    @FOR %i IN ($(Release_BIN) $(Release_STATICLIB) $(Release_LIBDEF) \
        Release\*.obj Release\*.@ $(Release_RESOURCE) \
        $(Release_PCH) $(Release_PDB) $(Release_OTHER)) DO @IF EXIST "%i" DEL "%i"

Debug: Debug_DIR Debug_unfinished $(Debug_PCH) $(Debug_BIN)
!IFDEF YOURMOD
    -COPY "$(Debug_BIN)" "$(YOURMOD)\Assets\."
!ENDIF

Release: Release_DIR Release_unfinished $(Release_PCH) $(Release_BIN)
!IFDEF YOURMOD
    -COPY "$(Release_BIN)" "$(YOURMOD)\Assets\."
!ENDIF

Debug_DIR:
    -@IF NOT EXIST "Debug\." MKDIR "Debug"

Release_DIR:
    -@IF NOT EXIST "Release\." MKDIR "Release"

Debug_unfinished:
    @ECHO.>Debug\unfinished.@
    @FOR /F "delims=@" %i IN ('dir /b Debug\*.@') DO \
        @IF EXIST "Debug\%i" DEL "Debug\%i"
    @FOR /F %i IN ('dir /b Debug\*.@') DO \
        @IF EXIST "Debug\%i" DEL "Debug\%i"

Release_unfinished:
    @ECHO.>Release\unfinished.@
    @FOR /F "delims=@" %i IN ('dir /b Release\*.@') DO \
        @IF EXIST "Release\%i" DEL "Release\%i"
    @FOR /F %i IN ('dir /b Release\*.@') DO \
        @IF EXIST "Release\%i" DEL "Release\%i"

$(Debug_BIN): $(Debug_LINKOBJS) $(Debug_RESOURCE)
    $(LD) /out:$(Debug_BIN) $(Debug_LDFLAGS) $(Debug_LIBS) $(Debug_LINKOBJS) $(Debug_RESOURCE)

$(Release_BIN): $(Release_LINKOBJS) $(Release_RESOURCE)
    $(LD) /out:$(Release_BIN) $(Release_LDFLAGS) $(Release_LIBS) $(Release_LINKOBJS) $(Release_RESOURCE)

.cpp{Debug}.obj:
    @ECHO.>"$*.obj.@"
    $(CPP) /nologo $(Debug_CFLAGS) $(Debug_INCS) /Fo$*.obj /c $<
    @DEL "$*.obj.@"

.cpp{Release}.obj:
    @ECHO.>"$*.obj.@"
    $(CPP) /nologo $(Release_CFLAGS) $(Release_INCS) /Fo$*.obj /c $<
    @DEL "$*.obj.@"

$(Debug_PCH) Debug\_precompile.obj:
    @ECHO.>"$(Debug_PCH).@"
    @ECHO.>"Debug\_precompile.obj.@"
    $(CPP) /nologo $(Debug_CFLAGS) $(Debug_INCS) /YcCvGameCoreDLL.h /Fo"Debug\_precompile.obj" /c _precompile.cpp
    @DEL "$(Debug_PCH).@"
    @DEL "Debug\_precompile.obj.@"

$(Release_PCH) Release\_precompile.obj:
    @ECHO.>"$(Release_PCH).@"
    @ECHO.>"Release\_precompile.obj.@"
    $(CPP) /nologo $(Release_CFLAGS) $(Release_INCS) /YcCvGameCoreDLL.h /Fo"Release\_precompile.obj" /c _precompile.cpp
    @DEL "$(Release_PCH).@"
    @DEL "Release\_precompile.obj.@"

.rc{Debug}.res:
    @ECHO.>"$*.res.@"
    $(RC) /Fo$@ $(Debug_INCS) $<
    @DEL "$*.res.@"

.rc{Release}.res:
    @ECHO.>"$*.res.@"
    $(RC) /Fo$@ $(Release_INCS) $<
    @DEL "$*.res.@"

!IFDEF BLACKLIST

Debug\$(BLACKLIST).obj: $(BLACKLIST).cpp
    @ECHO.>"$*.obj.@"
    @ECHO.>"$*-dummy.cpp"
    $(CPP) /nologo $(Debug_CFLAGS) $(Debug_INCS) /Y- /Fo$@ /c "$*-dummy.cpp"
    @DEL "$*-dummy.cpp"
    @DEL "$*.obj.@"

Release\$(BLACKLIST).obj: $(BLACKLIST).cpp
    @ECHO.>"$*.obj.@"
    @ECHO.>"$*-dummy.cpp"
    $(CPP) /nologo $(Release_CFLAGS) $(Release_INCS) /Y- /Fo$@ /c "$*-dummy.cpp"
    @DEL "$*-dummy.cpp"
    @DEL "$*.obj.@"

!ENDIF

!IFDEF FD

!IF [IF NOT EXIST $(FD) EXIT 1] == 0
!IF [$(FD) --objectextension=pch -q -O Debug CvGameCoreDLL.cpp > depends] != 0 || \
    [$(FD) --objectextension=obj -q -O Debug $(SOURCES) >> depends] != 0 || \
    [$(FD) --objectextension=pch -q -O Release CvGameCoreDLL.cpp >> depends] != 0 || \
    [$(FD) --objectextension=obj -q -O Release $(SOURCES) >> depends] != 0
!MESSAGE Error running fastdep.
!ENDIF
!ELSE
!IF [ECHO "fastdep.exe" NOT FOUND! && \
     ECHO Please edit Makefile to reflect the correct path of fastdep. && \
     ECHO. ]
!ENDIF
!ENDIF

!ENDIF

!IF EXIST(depends)
!INCLUDE depends
!ENDIF
 
Even though I got more errors and failed to compile, I feel I am getting closer to the answer and sdk something..
"The man who moves a mountain ..."

The Makefile looks fine; I think you'd see different (fewer) errors if the paths weren't correct. I've tried it myself in the meantime: the BtS DLL source code, overwritten with the RevDCM 2.9 source code, and last Asaf's .sln, vcproj and Makefile; all according to his guide. Works for me. Could you post the first few of those 113 errors?

I don't know if that's any help (probably not), but anyway, here's a list of the files that I have in my project directory, with file sizes and last-modified dates:
Spoiler :
Code:
31.10.2010  23:41             3.503 AI_Defines.h
22.03.2010  05:28               267 BetterBTSAI.cpp
22.03.2010  05:28               510 BetterBTSAI.h
31.01.2018  00:48    <DIR>          bin
31.01.2018  00:38    <DIR>          Boost-1.32.0
26.04.2007  04:01            27.533 CvArea.cpp
14.05.2009  12:41             6.081 CvArea.h
14.05.2009  12:41             5.462 CvArtFileMgr.cpp
14.05.2009  12:41             3.544 CvArtFileMgr.h
31.10.2010  23:41             2.959 CvBugOptions.cpp
31.10.2010  23:41             1.156 CvBugOptions.h
13.01.2011  07:53           487.043 CvCity.cpp
31.10.2010  23:41            80.224 CvCity.h
15.11.2010  03:13           463.730 CvCityAI.cpp
31.10.2010  23:41            13.936 CvCityAI.h
31.10.2010  23:41            47.531 CvDeal.cpp
14.05.2009  12:41             3.195 CvDeal.h
22.03.2010  05:28             7.331 CvDefines.h
31.10.2010  23:41             4.000 CvDefinesModTools.h
21.11.2006  12:02             6.220 CvDiploParameters.cpp
21.11.2006  12:02             3.118 CvDiploParameters.h
13.01.2011  07:53           102.565 CvDLLButtonPopup.cpp
14.01.2011  06:44             4.058 CvDLLButtonPopup.h
14.05.2009  12:41                16 CvDLLDataStreamIFaceBase.h
14.05.2009  12:41             4.240 CvDLLEngineIFaceBase.h
14.06.2007  22:33             2.164 CvDLLEntity.cpp
14.05.2009  12:41             1.929 CvDLLEntity.h
14.05.2009  12:41             3.089 CvDLLEntityIFaceBase.h
31.10.2010  23:41             5.242 CvDLLEventReporterIFaceBase.h
14.05.2009  12:41             1.461 CvDLLFAStarIFaceBase.h
05.02.2007  12:19             1.931 CvDLLFlagEntityIFaceBase.h
14.05.2009  12:41               914 CvDLLIniParserIFaceBase.h
14.05.2009  12:41            10.517 CvDLLInterfaceIFaceBase.h
14.05.2009  12:41               690 CvDLLPlotBuilderIFaceBase.h
22.03.2010  05:28             4.623 CvDLLPython.cpp
31.10.2010  23:41            35.349 CvDllPythonEvents.cpp
31.10.2010  23:41             7.043 CvDllPythonEvents.h
14.05.2009  12:41             4.694 CvDLLPythonIFaceBase.h
14.05.2009  12:41             3.532 CvDLLSymbolIFaceBase.h
14.05.2009  12:41             5.940 CvDllTranslator.cpp
14.05.2009  12:41               622 CvDllTranslator.h
14.05.2009  12:41            11.110 CvDLLUtilityIFaceBase.h
31.10.2010  23:41           213.876 CvDLLWidgetData.cpp
22.03.2010  05:28            16.191 CvDLLWidgetData.h
14.05.2009  12:41             6.720 CvDLLXMLIFaceBase.h
13.01.2011  07:53            70.328 CvEnums.h
31.10.2010  23:41            17.473 CvEventReporter.cpp
31.10.2010  23:41             7.600 CvEventReporter.h
14.05.2009  12:41            10.406 CvFractal.cpp
14.05.2009  12:41             2.025 CvFractal.h
13.01.2011  07:53           297.548 CvGame.cpp
15.11.2010  03:13            40.607 CvGame.h
14.05.2009  12:41             2.137 CvGameAI.cpp
14.05.2009  12:41               553 CvGameAI.h
31.10.2010  23:41             3.862 CvGameCoreDLL.cpp
14.05.2009  12:41             5.515 CvGameCoreDLL.h
31.10.2010  23:41             2.576 CvGameCoreDLL.rc
09.02.2018  19:26        66.015.232 CvGameCoreDLL.sdf
31.01.2018  00:40               897 CvGameCoreDLL.sln
10.01.2011  22:05            15.836 CvGameCoreDLL.vcproj
14.05.2009  12:41               278 CvGameCoreDLL.vcproj.vspscc
31.01.2018  01:20            14.783 CvGameCoreDLL.vcxproj
31.01.2018  01:20            21.279 CvGameCoreDLL.vcxproj.filters
31.01.2018  00:40               143 CvGameCoreDLL.vcxproj.user
14.05.2009  12:41               765 CvGameCoreDLLDefNew.h
14.05.2009  12:41               121 CvGameCoreDLLUndefNew.h
13.01.2011  07:55           111.481 CvGameCoreUtils.cpp
13.01.2011  07:53            19.875 CvGameCoreUtils.h
31.10.2010  23:41            99.537 CvGameInterface.cpp
13.01.2011  07:53           757.484 CvGameTextMgr.cpp
31.10.2010  23:41            25.956 CvGameTextMgr.h
13.01.2011  07:53           133.967 CvGlobals.cpp
13.01.2011  07:53            70.322 CvGlobals.h
21.11.2006  12:02               509 CvHallOfFameInfo.cpp
21.11.2006  12:02               348 CvHallOfFameInfo.h
13.01.2011  07:53         1.094.448 CvInfos.cpp
13.01.2011  07:53           338.462 CvInfos.h
31.10.2010  23:41            18.809 CvInfoWater.cpp
31.10.2010  23:41             7.978 CvInfoWater.h
31.10.2010  23:41            63.939 CvInitCore.cpp
22.03.2010  05:28            16.657 CvInitCore.h
22.03.2010  05:28            33.275 CvMap.cpp
22.03.2010  05:28             9.946 CvMap.h
14.05.2009  12:41            32.831 CvMapGenerator.cpp
14.05.2009  12:41             2.329 CvMapGenerator.h
31.10.2010  23:41             7.777 CvMessageControl.cpp
31.10.2010  23:41             3.012 CvMessageControl.h
31.10.2010  23:41            35.531 CvMessageData.cpp
31.10.2010  23:41            14.461 CvMessageData.h
13.01.2011  07:53           748.773 CvPlayer.cpp
13.01.2011  07:53           105.001 CvPlayer.h
13.01.2011  07:53           830.741 CvPlayerAI.cpp
31.10.2010  23:41            33.210 CvPlayerAI.h
13.01.2011  07:53           261.734 CvPlot.cpp
13.01.2011  07:53            38.933 CvPlot.h
22.03.2010  05:28             6.859 CvPlotGroup.cpp
14.05.2009  12:41             1.296 CvPlotGroup.h
20.04.2007  04:00             5.133 CvPopupInfo.cpp
20.04.2007  04:00             2.367 CvPopupInfo.h
21.11.2006  12:02             5.457 CvPopupReturn.cpp
14.05.2009  12:41             5.532 CvPopupReturn.h
21.11.2006  12:02             1.869 CvRandom.cpp
14.05.2009  12:41               678 CvRandom.h
14.05.2009  12:41            17.463 CvReplayInfo.cpp
21.11.2006  12:02             4.146 CvReplayInfo.h
21.11.2006  12:02             2.240 CvReplayMessage.cpp
21.11.2006  12:02             1.005 CvReplayMessage.h
13.01.2011  07:53           177.300 CvSelectionGroup.cpp
31.10.2010  23:41            16.058 CvSelectionGroup.h
31.10.2010  23:41            25.312 CvSelectionGroupAI.cpp
22.03.2010  05:28             2.829 CvSelectionGroupAI.h
14.05.2009  12:41            10.155 CvStatistics.cpp
14.05.2009  12:41             4.429 CvStatistics.h
22.03.2010  05:28            13.986 CvString.h
10.05.2007  04:00            14.824 CvStructs.cpp
14.05.2009  12:41            13.681 CvStructs.h
12.05.2007  03:59             5.056 CvTalkingHeadMessage.cpp
12.05.2007  03:59             2.109 CvTalkingHeadMessage.h
13.01.2011  07:53           234.468 CvTeam.cpp
31.10.2010  23:41            31.842 CvTeam.h
31.10.2010  23:41           176.050 CvTeamAI.cpp
31.10.2010  23:41            12.114 CvTeamAI.h
21.11.2006  12:02            16.565 CvTextScreens.cpp
13.01.2011  07:53           518.865 CvUnit.cpp
13.01.2011  07:53            57.239 CvUnit.h
13.01.2011  07:53           764.564 CvUnitAI.cpp
13.01.2011  07:53            21.982 CvUnitAI.h
22.03.2010  05:28            24.515 CvXMLLoadUtility.cpp
31.10.2010  23:41            27.742 CvXMLLoadUtility.h
21.11.2006  12:02            45.153 CvXMLLoadUtilityGet.cpp
07.02.2007  05:00            10.601 CvXMLLoadUtilityInit.cpp
31.10.2010  23:41            24.662 CvXMLLoadUtilityModTools.cpp
22.03.2010  05:28             1.854 CvXMLLoadUtilityModTools.h
31.10.2010  23:41           188.254 CvXMLLoadUtilitySet.cpp
31.10.2010  23:41            18.857 CvXMLLoadUtilitySetMod.cpp
22.03.2010  05:28             1.857 CvXMLLoadUtilitySetMod.h
21.11.2006  12:02             5.185 CyArea.cpp
14.05.2009  12:41             2.176 CyArea.h
21.11.2006  12:02             5.020 CyAreaInterface.cpp
01.03.2007  05:00             2.297 CyArgsList.cpp
14.05.2009  12:41             1.113 CyArgsList.h
21.11.2006  12:02             2.554 CyArtFileMgr.cpp
14.05.2009  12:41             1.801 CyArtFileMgr.h
21.11.2006  12:02             2.234 CyArtFileMgrInterface.cpp
31.10.2010  23:41            73.921 CyCity.cpp
31.10.2010  23:41            30.798 CyCity.h
31.10.2010  23:41            51.868 CyCityInterface1.cpp
31.10.2010  23:41            15.399 CyCityInterface2.cpp
22.03.2010  05:28             2.654 CyDeal.cpp
22.03.2010  05:28               975 CyDeal.h
13.01.2011  07:53           104.719 CyEnumsInterface.cpp
15.11.2010  03:13            37.418 CyGame.cpp
15.11.2010  03:13            18.152 CyGame.h
31.10.2010  23:41             6.671 CyGameCoreUtils.cpp
31.10.2010  23:41             3.571 CyGameCoreUtils.h
31.10.2010  23:41             6.152 CyGameCoreUtilsInterface.cpp
15.11.2010  03:13            26.769 CyGameInterface.cpp
23.05.2007  04:00             8.928 CyGameTextMgr.cpp
14.05.2009  12:41             3.242 CyGameTextMgr.h
28.03.2007  04:00             4.480 CyGameTextMgrInterface.cpp
22.03.2010  05:28            18.553 CyGlobalContext.cpp
13.01.2011  07:53            28.789 CyGlobalContext.h
31.10.2010  23:41            11.432 CyGlobalContextInterface1.cpp
13.01.2011  07:53            12.497 CyGlobalContextInterface2.cpp
22.03.2010  05:28             5.522 CyGlobalContextInterface3.cpp
22.03.2010  05:28            15.585 CyGlobalContextInterface4.cpp
21.11.2006  12:02               422 CyHallOfFameInfo.cpp
14.05.2009  12:41               358 CyHallOfFameInfo.h
21.11.2006  12:02             4.081 CyHallOfFameInterface.cpp
31.10.2010  23:41            50.182 CyInfoInterface1.cpp
31.10.2010  23:41            25.290 CyInfoInterface2.cpp
31.10.2010  23:41            52.449 CyInfoInterface3.cpp
22.03.2010  05:28             7.710 CyMap.cpp
22.03.2010  05:28             3.619 CyMap.h
21.11.2006  12:02             3.507 CyMapGenerator.cpp
14.05.2009  12:41             1.570 CyMapGenerator.h
21.11.2006  12:02             2.211 CyMapGeneratorInterface.cpp
22.03.2010  05:28             6.941 CyMapInterface.cpp
14.05.2009  12:41             2.756 CyMessageControl.cpp
14.05.2009  12:41             1.229 CyMessageControl.h
14.05.2009  12:41             1.993 CyMessageControlInterface.cpp
13.01.2011  07:53            78.357 CyPlayer.cpp
13.01.2011  07:53            33.960 CyPlayer.h
31.10.2010  23:41            43.844 CyPlayerInterface1.cpp
13.01.2011  07:53            11.856 CyPlayerInterface2.cpp
14.05.2009  12:41            26.016 CyPlot.cpp
14.05.2009  12:41            10.207 CyPlot.h
14.05.2009  12:41            17.674 CyPlotInterface1.cpp
21.11.2006  12:02               598 CyRandomInterface.cpp
21.11.2006  12:02             6.360 CyReplayInfo.cpp
14.05.2009  12:41             2.047 CyReplayInfo.h
22.03.2010  05:28             9.912 CySelectionGroup.cpp
22.03.2010  05:28             3.780 CySelectionGroup.h
22.03.2010  05:28             7.320 CySelectionGroupInterface.cpp
14.05.2009  12:41             8.904 CyStructsInterface1.cpp
31.10.2010  23:41            27.870 CyTeam.cpp
31.10.2010  23:41            12.049 CyTeam.h
31.10.2010  23:41            18.899 CyTeamInterface.cpp
13.01.2011  07:53            43.794 CyUnit.cpp
13.01.2011  07:53            17.005 CyUnit.h
13.01.2011  07:53            28.557 CyUnitInterface1.cpp
09.02.2018  20:16           205.228 depends
21.11.2006  12:02             4.417 FAssert.cpp
14.05.2009  12:41             1.251 FAssert.h
31.10.2010  23:41             2.693 FAStarNode.h
31.10.2010  23:41             4.327 FDataStreamBase.h
21.11.2006  12:02             5.191 FDialogTemplate.cpp
14.05.2009  12:41             2.235 FDialogTemplate.h
31.10.2010  23:41             8.463 FFreeListArray.h
31.10.2010  23:41             3.717 FFreeListArrayBase.h
31.10.2010  23:41            10.823 FFreeListTrashArray.h
31.10.2010  23:41             6.944 FInputDevice.h
21.11.2006  12:02             2.923 FProfiler.h
31.10.2010  23:41             6.221 FVariableSystem.h
21.11.2006  12:04            33.698 FVariableSystem.inl
21.11.2006  12:02               799 interfaceDirtyBits.inl
14.05.2009  12:41             7.999 LinkedList.h
09.02.2018  19:02             7.455 Makefile
31.01.2018  00:44    <DIR>          obj
31.01.2018  00:38    <DIR>          Python24
09.02.2018  20:16    <DIR>          Release
14.05.2009  12:41               411 resource.h
22.03.2010  05:28               735 Search Strings.txt
31.01.2018  00:40             1.518 UpgradeLog.XML
21.11.2006  12:02                84 _precompile.cpp
END OF LIST
(The UpgradeLog.XML and the three .vcxproj. files come from importing Asaf's .vcproj file into Visual C++ 2010 Express.)
 
OMG~!!!
I tried codes from the mod folder, not the source codes from the download link,
and it works~!!!!!:thumbsup::thumbsup::thumbsup: it worked~!!
OMG, OMG, OMG~~~!!!!!!
Thank you very much for your help and advises.
Now, I feel like I'm moving a step forward.
What I am going to do is go to a book store and grab a book for beginners and study programming more.
I think I should have knowledge, at least what I am doing wrong.

Thank you for sharing your time and knowledge.

Have a nice weekend~!
 
Top Bottom