Compiling AND in VC++

Arkatakor

King
Joined
Mar 11, 2006
Messages
619
Location
Stockholm, Sweden
I have posted this thread in the AND forum but it does not seem very active so I though I would double post by placing my query here as well:

I Been trying to compile the AND source code today. Here are the steps I followed

1) I did a get from the repository at:

https://anewdawn.svn.sourceforge.net/svnroot/anewdawn

2) I copied everything under "Trunk" directory into a directory to my "Firaxis Beyond the Sword\Mods" directory.

3) In the makefile I altered the

TOOLKIT=C:\Program Files (x86)\Microsoft Visual C++ Toolkit 2003

and

PSDK=C:/Program Files/Microsoft SDKs/Windows/v6.0A

directories to the relevant directories on my system.

4) I opened the "A New Dawn (VS 2008).sln" and attempted to build the project. I got this error:

Spoiler :
1>------ Build started: Project: A New Dawn, Configuration: Debug Win32 ------
1>
1> Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
1> Copyright (C) Microsoft Corporation. All rights reserved.
1>
1> "C:/Program Files /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" /D_MOD_SENTRY /D_MOD_FRACTRADE /D_MOD_GOVWORKERS /DQC_MASTERY_VICTORY /DLOG_AI /D_MOD_GWARM /D_MOD_SHAM_SPOILER /IBoost-1.32.0/include /IPython24/include /I"C:/Program Files /Microsoft Visual C++ Toolkit 2003/include" /I"C:/Program Files/Microsoft Platform SDK/Include" /I"C:/Program Files/Microsoft Platform SDK/Include/mfc" /YcCvGameCoreDLL.h /Fo"Debug\_precompile.obj" /c _precompile.cpp
1> 'C:/Program' is not recognized as an internal or external command,
1> operable program or batch file.
1>NMAKE : fatal error U1077: '"C:/Program Files /Microsoft Visual C++ Toolkit 2003\bin\cl.exe' : return code '0x1'
1> Stop.
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command "nmake Debug" exited with code 2.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


Its complaining about "C:/Program" not being recognized as an internal or external command which makes sense, so I am trying to figure out where this argument is being passed in.

PS: I am using Microsoft Visual C++ 2010 (express) - is that causing problems perhaps?
 
I guess using the \ instead of the / could make some difference (but i haven't done any compiling for a long time, so i might be wrong here).
I went ahead and changed my / to \ in the makefile, unfortunately it made no difference. Am wondering if there is some anomaly with the Microsoft SDK itself (as I am using the latest version) but its not the Microsoft SDK thats complaining, rather the cl.exe which is in the "Microsoft Visual C++ Toolkit 2003\bin" directory.
 
The platform SDK that comes with Windows 7 x64 works fine for me. However, it is in "C:\Program Files (x86)\...", like deanej points out.

If that doesn't help, I'd ask: what makefile are you using, and can you compile the unmodded BTS DLL?
 
I am running windows XP: I think there was a misunderstanding; the directories I changed actually WERE (x86) directories when I got it from the website. I changed them to relevant directories on my system as I dont have any (x86) folders; Here is the make file I am using. The folders referenced by my TOOLKIT and PSDK variables in the following makefile ARE valid.

Spoiler :
#### 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/Microsoft SDKs/Windows/v6.0A
TOOLKIT=C:\Program Files \Microsoft Visual C++ Toolkit 2003
PSDK=C:/Program Files/Microsoft Platform SDK
## Uncomment to have newly compiled dlls copied to your mod's Assets directory
#YOURMOD=C:\Users\Danny\Documents\My Games\beyond the sword\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 ####
#################################################################

Debug_GLOBAL_CFLAGS= /D_MOD_SENTRY /D_MOD_FRACTRADE /D_MOD_GOVWORKERS /DQC_MASTERY_VICTORY /DLOG_AI /D_MOD_GWARM /D_MOD_SHAM_SPOILER
Final_Release_GLOBAL_CFLAGS= /D_MOD_SENTRY /D_MOD_FRACTRADE /D_MOD_GOVWORKERS /DQC_MASTERY_VICTORY /D_MOD_GWARM /D_MOD_SHAM_SPOILER
Release_GLOBAL_CFLAGS= /D_MOD_SENTRY /D_MOD_FRACTRADE /D_MOD_GOVWORKERS /DQC_MASTERY_VICTORY /DLOG_AI /DFP_PROFILE_ENABLE /D_MOD_GWARM /D_MOD_SHAM_SPOILER

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

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

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

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

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

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

Debug_OTHER=Debug\CvGameCoreDLL.exp Debug\CvGameCoreDLL.ilk
Release_OTHER=Release\CvGameCoreDLL.exp
Final_Release_OTHER=Final_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) $(Debug_GLOBAL_CFLAGS)
Release_CFLAGS=/MD /O2 /Oy /Oi /G7 /DNDEBUG /DFINAL_RELEASE /Fp"$(Release_PCH)" $(GLOBAL_CFLAGS) $(Release_GLOBAL_CFLAGS)
Final_Release_CFLAGS=/MD /O2 /Oy /Oi /G7 /DNDEBUG /DFINAL_RELEASE /Fp"$(Final_Release_PCH)" $(GLOBAL_CFLAGS) $(Final_Release_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 /DEBUG /OPT:REF /OPT:ICF /IMPLIB:"$(Release_STATICLIB)" /PDB:"$(Release_PDB)" $(GLOBAL_LDFLAGS)
Final_Release_LDFLAGS=/INCREMENTAL:NO /OPT:REF /OPT:ICF /IMPLIB:"$(Final_Release_LIBDEF)" /PDB:"$(Final_Release_PDB)" $(GLOBAL_LDFLAGS)

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

#### LIBS ####
GLOBAL_LIBS=/LIBPATH:"$(TOOLKIT)/lib" /LIBPATH:"$(PSDK)/Lib" 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 #/NODEFAULTLIB:msvcprtd.lib
Release_LIBS=$(PROJECT_LIBS) $(GLOBAL_LIBS)
Final_Release_LIBS=$(PROJECT_LIBS) $(GLOBAL_LIBS)

#### Objects ####
Debug_LINKOBJS=$(Debug_OBJS)
Release_LINKOBJS=$(Release_OBJS)
Final_Release_LINKOBJS=$(Final_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 && \
[ECHO Final_Release_OBJS= \>> sources.mk] == 0 && \
[FOR /F "delims=." %i IN ('dir /b *.cpp') DO @ECHO. Final_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 Final_Release_clean Debug Release Final_Release

all: Debug Final_Release Release

clean: Debug_clean Release_clean Final_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"

Final_Release_clean:
@FOR %i IN ($(Final_Release_BIN) $(Final_Release_STATICLIB) $(Final_Release_LIBDEF) \
Final_Release\*.obj Final_Release\*.@ $(Final_Release_RESOURCE) \
$(Final_Release_PCH) $(Final_Release_PDB) $(Final_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

Final_Release: Final_Release_DIR Final_Release_unfinished $(Final_Release_PCH) $(Final_Release_BIN)
!IFDEF YOURMOD
-COPY "$(Final_Release_BIN)" "$(YOURMOD)\Assets\."
!ENDIF

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

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

Final_Release_DIR:
-@IF NOT EXIST "Final_Release\." MKDIR "Final_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"

Final_Release_unfinished:
@ECHO.>Final_Release\unfinished.@
@FOR /F "delims=@" %i IN ('dir /b Final_Release\*.@') DO \
@IF EXIST "Final_Release\%i" DEL "Final_Release\%i"
@FOR /F %i IN ('dir /b Final_Release\*.@') DO \
@IF EXIST "Final_Release\%i" DEL "Final_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)

$(Final_Release_BIN): $(Final_Release_LINKOBJS) $(Final_Release_RESOURCE)
$(LD) /out:$(Final_Release_BIN) $(Final_Release_LDFLAGS) $(Final_Release_LIBS) $(Final_Release_LINKOBJS) $(Final_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.@"

.cpp{Final_Release}.obj:
@ECHO.>"$*.obj.@"
$(CPP) /nologo $(Final_Release_CFLAGS) $(Final_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.@"

$(Final_Release_PCH) Final_Release\_precompile.obj:
@ECHO.>"$(Final_Release_PCH).@"
@ECHO.>"Final_Release\_precompile.obj.@"
$(CPP) /nologo $(Final_Release_CFLAGS) $(Final_Release_INCS) /YcCvGameCoreDLL.h /Fo"Final_Release\_precompile.obj" /c _precompile.cpp
@DEL "$(Final_Release_PCH).@"
@DEL "Final_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.@"

.rc{Final_Release}.res:
@ECHO.>"$*.res.@"
$(RC) /Fo$@ $(Final_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.@"

Final_Release\$(BLACKLIST).obj: $(BLACKLIST).cpp
@ECHO.>"$*.obj.@"
@ECHO.>"$*-dummy.cpp"
$(CPP) /nologo $(Final_Release_CFLAGS) $(Final_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 || \
[$(FD) --objectextension=pch -q -O Final_Release CvGameCoreDLL.cpp >> depends] != 0 || \
[$(FD) --objectextension=obj -q -O Final_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


I am thinking its more of an issue with the Microsoft Platform SDK - maybe I should be using a specific version? I am using the most recent version.

Maybe I should check into compile the unmodded BTS DLL; any links that can show me how to get started on that? I suppose I could use this - I might try it then unless someone has some other advice:

http://modiki.civfanatics.com/index.php/How_to_Install_the_SDK
__________________
 
You might want to try removing the space from after Program Files in your TOOLKIT path. Also, I am on Windows XP as well and use C:\Program Files\Microsoft Platform SDK versus C:\Program Files\Microsoft SDKs\Windows\v6.0A. You might want to try that as well.

I highly doubt it's the mod itself that's causing the error unless the mod made changes to the makefile.
 
Oh. That space after "Program " will do it, because "C:\Program__Files" is not a directory or a file. It would produce an error like the one you're getting.

Note: CFC is compacting my two spaces to one, so I used underscores instead.
 
...Isn't the space after "files"?

And to clarify what I said before about the PSDK paths, I have both paths on my PC but only the first works.
 
Yep; that annoying space was the culprit - I cannot believe I overlooked that when I edited that line to remove the (x86). Now I am trying to remember how to include libraries in my project as the following header in my CvGameCoreDLL.h file is invalid:

CvGameCoreDLL.h:
//
// Boost Python
//
# include <boost/python/list.hpp> //Invalid Header

Hence the following output.
Spoiler :
1>------ Build started: Project: A New Dawn, Configuration: Debug Win32 ------
1>
1> Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
1> Copyright (C) Microsoft Corporation. All rights reserved.
1>
1> "C:\Program Files\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" /D_MOD_SENTRY /D_MOD_FRACTRADE /D_MOD_GOVWORKERS /DQC_MASTERY_VICTORY /DLOG_AI /D_MOD_GWARM /D_MOD_SHAM_SPOILER /IBoost-1.32.0/include /IPython24/include /I"C:\Program Files\Microsoft Visual C++ Toolkit 2003/include" /I"C:/Program Files/Microsoft Platform SDK/Include" /I"C:/Program Files/Microsoft Platform SDK/Include/mfc" /YcCvGameCoreDLL.h /Fo"Debug\_precompile.obj" /c _precompile.cpp
1> _precompile.cpp
1>d:\games\Firaxis Games\Sid Meier's Civilization 4\Beyond the Sword\Mods\Sources\CvGameCoreDLL.h(160): fatal error C1083: Cannot open include file: 'boost/python/list.hpp': No such file or directory
1>NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin\cl.exe"' : return code '0x2'
1> Stop.
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command "nmake Debug" exited with code 2.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I have the 'boost/python/list.hpp' file in another but I am loath to copy all the source files; rather I should be able to inlcude the boost stuff via the project properties, just don't remember where.
 
Asaf posted a very useful edit to Danny Daemonic's makefile here which doesn't require the boost and python folders to be in your mod directory; it looks for them in your civ install directory.
 
Asaf posted a very useful edit to Danny Daemonic's makefile here which doesn't require the boost and python folders to be in your mod directory; it looks for them in your civ install directory.
wow that totally worked; it was exactly what I needed - thanks! Now my project compiles fine.

My next step is to figure out how to actually debug - just hit the F5 button and it wants the 'A New Dawn.exe' to run, even though the project only generates a DLL and there is never supposed to be such an executable in the first place. I am guessing I must find out where it is trying to reference that executable, and change its path to point to the 'Civ4BeyondSword.exe' in order to debug...

EDIT: Just solved that problem via Asaf's tutorial on setting up Visual Express to link to the EXE. I just started to run it in debug mode; astoundingly slow - I loaded the mod fine via debug, now am still waiting for my map (tiny) to load.

Update: Arg load failed as my CvPlayer.cpp gave me an assert at line:

FAssertMsg(iValue >= 0, "iValue cannot be less than 0");

Here is the window it generated:

Assert Failed

File: CvPlayer.cpp
Line: 29000
Expression: iValue >= 0
Message: iValue cannot be less than 0
 
Could you post the code surrounding the assert that failed, so I could look and see why it failed?
 
Thanks for the input guys; I am able to debug it by doing the attach to process method. However I simply don't remember ever having to do this when I managed to make it work previously; as far as I remember I could press F11 or F5 and I could launch the program directly as such. The key would be to tell the compiler that the DLL is in a separate directory and to debug it remotely from the current project directory.

Either way this "attach to process" method should solve my problem for now.

EDIT: wow, totally wrong thread - sorry for ressurecting this.
 
Top Bottom