Command & Conquer Remastered Collection – Errors and Debugging Guide (Start of Modding)

Some issues I ran into while trying to build CnC Solution.

Solutions Guide

Cannot open include file ‘afxres.h’

You need to install “Microsoft Foundation Classes for C++”.

Visual Studio 2017 or 2019 (Apparently including Express versions).

Do I need to publish PDB file?

“A program database file (extension .pdb) is a binary file that contains type and symbolic debugging information gathered over the course of compiling and linking the project.”

It not used by the game. So its not essential.

A PDB file is useful for other developers if they don’t have your source code and can get extra information when something goes wrong. It does not contain source code so you wont see the exact place.

In terms of publishing.. it takes up more space. And probably its very rare any body will use it.

Debugging tricks 101

Global “poor mans” Logging.

Inside WINSTUB.CPP you can change the 0 to 1 to enable the original DEV debugging file.

This will start to append text to C:Program Files (x86)SteamsteamappscommonCnCRemastereddebug.txt

The function CCDebugString(“”) is available globally.

In Game

Not really figured out how to write custom text to screen. Like the messages you see during normal Campaigns. Seems like all those are static text files which makes sense for translations.

But you can use Help_Text(TXT_CHOOSE_SIDE, -1, -1, YELLOW); for example. Not fully fully figured out the integers yet. But the text is only a static integer reference and the colour seems to be the WIN defined ones.. and some extra in game ones.

Be the first to comment

Leave a Reply

Your email address will not be published.