Execution of 'rc.exe -fo"Final Release\CvGameCoreDLL.res" CvGameCoreDLL.rc' failed

Grave

1 Goat = 400 Horses
Joined
May 5, 2002
Messages
1,530
Location
Louisiana
Well, I'm trying to compile the BtS SDK... and ran into this problem (see item highlighted red):

Code:
Project   : CvGameCoreDLL
Compiler  : Microsoft Visual C++ Toolkit 2003 (called directly)
Directory : C:\Games\Sid Meier's Civilization IV\Beyond the Sword\CvGameCoreDLL\
--------------------------------------------------------------------------------
Switching to target: Final Release
CvArea.cpp
CvArtFileMgr.cpp
CvCity.cpp
CvCityAI.cpp
CvDLLButtonPopup.cpp
CvDLLEntity.cpp
CvDLLPython.cpp
CvDLLWidgetData.cpp
CvDeal.cpp
CvDiploParameters.cpp
CvFractal.cpp
CvGame.cpp
CvGameAI.cpp
CvGameCoreDLL.cpp
[COLOR="Red"]Execution of 'rc.exe    -fo"Final Release\CvGameCoreDLL.res" CvGameCoreDLL.rc' in 'C:\Games\Sid Meier's Civilization IV\Beyond the Sword\CvGameCoreDLL' failed.[/COLOR]

What does that mean and how do I fix it? :confused:
 
I get the exact same error. I'm attempting a compile of the 3.02 revision SDK source code.

EDIT: I did get around this by removing the *.rc file from the directory, but instead stumbled into a fatal link error with the CvGameCoreDLL.res file...

How far did you get, Grave?
 
What I posted was about as far as I got. :(


I opened up the CvGameCoreDLL.rc file, and this is what it looks like:

Code:
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"

#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"

/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS

/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32

#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//

1 TEXTINCLUDE 
BEGIN
    "resource.h\0"
END

2 TEXTINCLUDE 
BEGIN
    "#include ""afxres.h""\r\n"
    "\0"
END

3 TEXTINCLUDE 
BEGIN
    "\r\n"
    "\0"
END

#endif    // APSTUDIO_INVOKED


/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
 FILEVERSION 1,0,0,1
 PRODUCTVERSION 1,0,0,1
 FILEFLAGSMASK 0x17L
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
 FILEOS 0x4L
 FILETYPE 0x2L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904b0"
        BEGIN
            VALUE "Comments", "Use the SDK to override the default game rules"
            VALUE "CompanyName", "Firaxis Games"
            VALUE "FileDescription", "Game core DLL for Sid Meier's Civilization 4 : Beyond The Sword"
            VALUE "FileVersion", "1, 0, 0, 1"
            VALUE "InternalName", "Sid Meier's Civilization 4 : Beyond The Sword Game Core DLL"
            VALUE "LegalCopyright", "Copyright (C) Firaxis Games.  All Rights Reserved."
            VALUE "OriginalFilename", "CvGameCoreDLL.dll"
            VALUE "ProductName", "Sid Meier's Civilization 4 : Beyond The Sword"
            VALUE "ProductVersion", "1, 0, 0, 1"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x409, 1200
    END
END

#endif    // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////



#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//


/////////////////////////////////////////////////////////////////////////////
#endif    // not APSTUDIO_INVOKED


It looks like something that lets you label the DLL file once it's compiled, like the way you label an MP3 file with song name, artist, album, etc...
 
What I posted was about as far as I got. :(


I opened up the CvGameCoreDLL.rc file, and this is what it looks like:


It looks like something that lets you label the DLL file once it's compiled, like the way you label an MP3 file with song name, artist, album, etc...

Agreed. Do you recall if the *.inl files at the bottom of the DLL source directory were in there in WL 2.08 or earlier, or are those new files, too?

I'm trying to figure out if any of these files are extraneous and cause issues with the source compile.

EDIT: I pulled the inl files out, and it caused a fatal error. They're include files, and they're necessary.
 
Try deleting the .rc file out of the project and do a full compile.
 
Try deleting the .rc file out of the project and do a full compile.

Ok, I'll try that now.

So this file isn't required?
 
It shouldn't be. I deleted it during production for every build, and it didn't cause a problem. :)
 
It shouldn't be. I deleted it during production for every build, and it didn't cause a problem. :)

This is what I got... right at the very end...

Code:
Project   : CvGameCoreDLL
Compiler  : Microsoft Visual C++ Toolkit 2003 (called directly)
Directory : C:\Games\Sid Meier's Civilization IV\Beyond the Sword\CvGameCoreDLL\
--------------------------------------------------------------------------------
Switching to target: Final Release
CvArea.cpp
CvArtFileMgr.cpp
CvCity.cpp
CvCityAI.cpp
CvDLLButtonPopup.cpp
CvDLLEntity.cpp
CvDLLPython.cpp
CvDLLWidgetData.cpp
CvDeal.cpp
CvDiploParameters.cpp
CvFractal.cpp
CvGame.cpp
CvGameAI.cpp
CvGameCoreDLL.cpp
CvGameCoreUtils.cpp
CvGameTextMgr.cpp
CvGlobals.cpp
CvHallOfFameInfo.cpp
CvInfoWater.cpp
CvInfos.cpp
CvInitCore.cpp
CvMap.cpp
CvMapGenerator.cpp
CvPlayer.cpp
CvPlayerAI.cpp
CvPlot.cpp
CvPlotGroup.cpp
CvPopupInfo.cpp
CvPopupReturn.cpp
CvRandom.cpp
CvReplayInfo.cpp
CvReplayMessage.cpp
CvSelectionGroup.cpp
CvSelectionGroupAI.cpp
CvStructs.cpp
CvTalkingHeadMessage.cpp
CvTeam.cpp
CvTeamAI.cpp
CvUnit.cpp
CvUnitAI.cpp
CvXMLLoadUtility.cpp
CvXMLLoadUtilityGet.cpp
CvXMLLoadUtilityInit.cpp
CvXMLLoadUtilitySet.cpp
CyArea.cpp
CyAreaInterface.cpp
CyArgsList.cpp
CyArtFileMgr.cpp
CyArtFileMgrInterface.cpp
CyCity.cpp
CyCityInterface1.cpp
CyDeal.cpp
CyEnumsInterface.cpp
CyGame.cpp
CyGameCoreUtils.cpp
CyGameCoreUtilsInterface.cpp
CyGameInterface.cpp
CyGameTextMgr.cpp
CyGameTextMgrInterface.cpp
CyGlobalContext.cpp
CyGlobalContextInterface1.cpp
CyGlobalContextInterface2.cpp
CyGlobalContextInterface3.cpp
CyGlobalContextInterface4.cpp
CyHallOfFameInfo.cpp
CyHallOfFameInterface.cpp
CyInfoInterface1.cpp
CyInfoInterface2.cpp
CyInfoInterface3.cpp
CyMap.cpp
CyMapGenerator.cpp
CyMapGeneratorInterface.cpp
CyMapInterface.cpp
CyPlayer.cpp
CyPlayerInterface1.cpp
CyPlayerInterface2.cpp
CyPlot.cpp
CyPlotInterface1.cpp
CyRandomInterface.cpp
CyReplayInfo.cpp
CySelectionGroup.cpp
CySelectionGroupInterface.cpp
CyStructsInterface1.cpp
CyTeam.cpp
CyTeamInterface.cpp
CyUnit.cpp
CyUnitInterface1.cpp
FAssert.cpp
FDialogTemplate.cpp
_precompile.cpp
Linking dynamic library: ..\Beyond the Sword\Assets\CvGameCoreDLL.dll
[COLOR="Red"]LINK : fatal error LNK1181: cannot open input file 'Final Release\CvGameCoreDLL.res'
Process terminated with status 1 (6 minutes, 38 seconds)[/COLOR]1 errors, 0 warnings

Then, I removed the "Other" folder that was in my Default Workspace window in CodeBlocks (right under Headers and Sources)

Recompiled, and it worked.



So Dale... what were those files used for, and why do we need to remove them when we compile? It doesn't make sense to me to have them included with the SDK files if they don't serve a utility.


But hey, thanks for pointing us in the right direction! :king:
 
Yep. Did it here, too. I've now got my 34 man DLL for Rev 3.02. I'll test it tomorrow night along with Blue Marble 3.0 and maybe White Rabbit's EDU 3.0. Thanks for your help, Dale.

...and now I've also got a v3.02 BtS DLL that allows for 34 man games and lets the player become the vassal of the AI. Gotta test it out, too.
 
Those are resource files.

As an example, they can include instructions for the DLL version number etc.

They can also contain other stuff (like windows resources) I think -- I don't know, I'm not much of a windows programmer. :)
 
No idea what they were used for. Resource files can be used for many things..... icons, pointers to files, etc etc. :)
 
I am using the makefile from the thread about "Using Visual Studio 2005 Express". I didn't have this problem because simply the makefile doesn't use the .rc file at all.

However if you guys like to still include the rc file (May be the exe would check for the DLL version or something). There are many compatible Resource Compilers that come with free compiler kits. Get one of them and place it in the bin directory of the VS2003 kit. In codeblocks there is an option to specifiy the resource compile to use with .rc files. Set this to point to your resource compiler. This should work fine.

Edit: Actually the contents of this RC file produce the data you get when you right click the DLL and choose properties, that is it. So in general it is just fine to do without it (it will make the DLL a little smaller)
 
I just upgraded to VS 2005 Professional... I am having trouble compiling as well and came across this (and a couple of other threads)... I am developing things outside of Civ but this was the reason I "hurried" to get it. Now I am really annoyed that it won't compile without all this shinanigans... BUT I have considerable programming experience compared to some (it seems) so I will tell you what I know about .RC files (resource files).

About Resource Files
"Resources" are things such as graphics, icons, cursors, dialog box metrics, strings... and a few other things (that are more recent) that are compiled as part of the executable. The .RC file is what defines these resources or at least their location (for things such as icons) so that they can be "grabbed" and put into the executable.

Strings defined in the resource file are compiled into something called a "string table" (which is probably one of the reasons Civ4 uses them) and become part of the executable and allow for multi-language capabilities. However, since Civ4 defines most of its strings using XML there are probably very few string resources in this file.

Dialog boxes can also be defined in resource files (such as their size, initial state, strings (also put into the string table), objects such as buttons and their locations, and default values that are to be used).

From the looks of this particular file, it looks as though this resource file simply contains text information that is used in versioning displayed when the OS calls for such info such as on the "summary" page when you right click an executable and then click "Properties."

Therefore, the contents of this file are probably not necessary.

EDIT: :lol: LOL... I just read kalimakhus's post more carefully and it looks as though I was right
 
Hi primimOver!

What problems you have compiling with VS2005 Pro? I am also using it. I actually have an old VS2003 I could have simply install it to work with the DLL. I prefered the work around however as it is quite simple and I can still use the VC++ 2005 IDE which is better than the older one.
 
I fixed my problems (a lot)... though thanks

First, the usual incompatibilities. Then, I kept getting linking errors (several types over the course of figuring things out). Then, I could get it to compile but not put in all the debug info into the pdb file so I couldn't trace what was causing the crash I was then trying to fix. I have altered the makefile considerably and fixed my problems. I had to alter several sections in that area you are "not supposed" to need to alter. Some of that was due to the fact that I have added several files to the build though (for my non-BtS events mod). They would not compile unless I added sections for them to the makefile (duh!)
 
Well, this is the main drawback of using VS2005. It will execute the commands in the makefile but this is as far as it can go in this area. It won't maintain the Makefile for you. It won't add the new files or edit the compile and link options.

I have used Code Blocks before (not with civ related projects). It maintains the makefile very well and makes any changes you need right from the IDE itself.

Now, I chose VS2005 because, first I already have it and I already do my other stuff with it. Second it is for sure a superior IDE when it comes do dealing with code. It makes many things easier and get them done faster. Also it has a much better debugger.

I however like to hear from someone who uses Code Blocks about how things are going with working on the DLL.
 
I wonder if there is a VS plugin for make file projects (at the very least, maintaining them)... it might be worth writing.
 
Top Bottom