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

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

Command & Conquer Remastered Collection - Errors and Debugging Guide (Start of Modding) image 0

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

Solutions Guide

Cannot Open Include File 'afxres.h'
Command & Conquer Remastered Collection - Errors and Debugging Guide (Start of Modding) image 4

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?
Command & Conquer Remastered Collection - Errors and Debugging Guide (Start of Modding) image 8

"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)\Steam\steamapps\common\CnCRemastered\debug.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.

Source: https://gameplay.tips/guides/7820-command-and-conquer-remastered-collection.html					

More Command and Conquer Remastered Collection guilds