Game Development Community

Build error when building on VS 2005

by Thijs Sloesen · in Torque Game Builder · 05/12/2006 (3:21 pm) · 2 replies

DESCRIPTION OF PROBLEM

When building on Visual Studio 2005 Team Edition for Software Developers (v8.0.5), TGB will not build and the compiler complains about not being able to find the include file "mfc/afxres.h". The (incremental) build log is as follows :

------ Build started: Project: T2D, Configuration: Debug Win32 ------
Performing Pre-Build Event...
Could Not Find c:\Projects\Beta3_TorqueGameBuilder_1_1\engine\Lib\directx8\basetsd.h
Compiling resources...
.\T2D SDK.rc(10) : fatal error RC1015: cannot open include file 'mfc/afxres.h'.
Build log was saved at "file://c:\Projects\Beta3_TorqueGameBuilder_1_1\engine\Link\Debug\BuildLog.htm"
T2D - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 6 up-to-date, 0 skipped ==========

DESCRIPTION OF SOLUTION

This can be fixed by changing the include filename reference in the resource file from "mfc/afxres.h" to "afxres.h". The compiler will (as far as I can tell) revert to "VC\atlmfc\include\afxres.h", and the build is working.

#1
05/12/2006 (4:49 pm)
Actually, I think you can also change that "mfc/afxres.h" to "windows.h" which stops the Microsoft Foundation Classes from being included, which aren't needed

That include seems to be an automatic one done by the MS compiler. MS wuvs their MFC, yes the do! And try to include it at the drop of a hat!
#2
05/12/2006 (4:51 pm)
Hmm, I see. Changing to "windows.h" sounds even better. I always thought MFC was evil anyway *grin*