Problem cannot open include file afxres.h

marcogavazzeni

Addon Developer
Addon Developer
Joined
Jan 5, 2009
Messages
219
Reaction score
0
Points
16
Location
Near Verona
Website
orbiteritalia.forumotion.com
Hi guys

I can not build the module at the Atlantis,it always gives me this error:

1>Atlantis.rc(10): fatal error RC1015: cannot open include file 'afxres.h'.

Why?This file is included :shrug:
 

orb

New member
News Reporter
Joined
Oct 30, 2009
Messages
14,020
Reaction score
4
Points
0
The "afxres.h" file is a part of MFC that isn't included with Express version of Visual C++. This header file is used by resource files.

To fix this error in all projects, you can create a new "afxres.h" file in the include folder of Windows/Platform SDK containing this code:
Code:
#ifndef __AFXRES_H__
#define __AFXRES_H__

#include <Windows.h>
#include <CommCtrl.h>
#define IDC_STATIC -1

#endif /*__AFXRES_H__*/
There can be more Windows header files that define controls included, but these 2 are sufficient for compiling resources from the most of Orbiter and non-Orbiter projects.

NOTE: The last line of afxres.h file needs to end with enter / new line character, otherwise there will be error: "afxres.h(8): fatal error RC1004: unexpected end of file found".
 
Last edited:

marcogavazzeni

Addon Developer
Addon Developer
Joined
Jan 5, 2009
Messages
219
Reaction score
0
Points
16
Location
Near Verona
Website
orbiteritalia.forumotion.com
I put the file "afxres.h" in the folder Microsoft SDKs

1>------ Inizio compilazione: Progetto: Atlantis, Configurazione: Release Win32 ------
2>------ Inizio compilazione: Progetto: AtlantisConfig, Configurazione: Release Win32 ------
2>C:\Programmi\Microsoft SDKs\Windows\v7.0A\include\afxres.h(8): fatal error RC1004: unexpected end of file found
2>
1>afxres.h(8): fatal error RC1004: unexpected end of file found
1>
========== Compilazione: 0 completate, 2 non riuscite, 2 aggiornate, 0 ignorate ==========

I use Visual C++ 2010 express
 
Last edited:

orb

New member
News Reporter
Joined
Oct 30, 2009
Messages
14,020
Reaction score
4
Points
0
Add a new empty line (press enter after the last line) at the end of file.
 
Top