KMQuake 2 source code error

Discuss anything not covered by any of the other categories.
Post Reply
franqutrass
Posts: 69
Joined: Wed Dec 30, 2009 6:29 pm
Location: peru
Contact:

KMQuake 2 source code error

Post by franqutrass »

I have a problem with the KMQuake 2 source code when I compile the "engine source code (updated ) you can download of here: http://kmq2.quakedev.com/files/kmquake2 ... fx3_src.7z" sends me this error "win32 \ q2_2005.rc (10): fatal error RC1015: can not open include file 'afxres.h'" I'm using the Microsoft Visual C + + 2010 Exprerss to compile.
hello
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Post by Spike »

the afxres.h retardedness is a broken part of some visual stupio version.
I think technically afxres.h is part of MFC, which isn't provided with express versions of msvc, and I've never heard of any quake engines actually using MFC as its not really intended for that sort of thing.
you can prolly work around it by just changing the include line to 'windows.h' instead or something like that.
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Post by Baker »

Baker wrote:2. winquake.rc has #include "afxres.h" which is Googling tells me is an MFC file header and not meant/supposed to be using with Visual C++ Express Edition (reference thread), I opened up DarkPlaces source version of winquake.rc and used that as a model.
Read more in the thread where I got GLQuake to compile using Visual C++ Express 2008:

http://forums.inside3d.com/viewtopic.php?t=1281

In that thread there is downloadable project file .zip, you could open that up and see what modifications I did to side-step use of afxres.h -- which should apply to a Q2 engine as well.

In other words, your q2_2005.rc to the modified winquake.rc and adjust it accordingly. Or open up the DarkPlaces .rc file as a model.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
franqutrass
Posts: 69
Joined: Wed Dec 30, 2009 6:29 pm
Location: peru
Contact:

Post by franqutrass »

Ok, but I do not understand how I can fix the problem,
I need to tell me step by step I should do to compile without errors, the source code of KMQuake 2
hello
franqutrass
Posts: 69
Joined: Wed Dec 30, 2009 6:29 pm
Location: peru
Contact:

Post by franqutrass »

Search and already found what I think is the file "afxres.h" of this web page: "http://www.koders.com/c/fid533F9524B20E ... s=afxwin.h " but it just goes compile sends me these errors:

win32\q2_2005.rc(20): error RC2144: PRIMARY LANGUAGE ID not a number


win32\q2_2005.rc(56): error RC2135: file not found: VS_VERSION_INFO


win32\q2_2005.rc(57): error RC2135: file not found: 0


win32\q2_2005.rc(58): error RC2135: file not found: 0


win32\q2_2005.rc(59): error RC2135: file not found: 0x3fL


win32\q2_2005.rc(65): error RC2135: file not found: FILEOS


win32\q2_2005.rc(66): error RC2135: file not found: 0x1L


win32\q2_2005.rc(69): error RC2164: unexpected value in RCDATA


win32\q2_2005.rc(71): error RC2135: file not found: BLOCK


win32\q2_2005.rc(73): error RC2135: file not found: VALUE
hello
r00k
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Post by r00k »

in the .rc file replace the "afxres.h" with "windows.h"
then add this right after that...

Code: Select all

#ifndef _AFXRES_H
#define _AFXRES_H
#if __GNUC__ >= 3
#pragma GCC system_header
#endif

#ifdef __cplusplus
extern "C" {
#endif

#ifndef _WINDOWS_H
#include <windows.h>
#endif

/* IDC_STATIC is documented in winuser.h, but not defined. */
#ifndef IDC_STATIC
#define IDC_STATIC (-1)
#endif

#ifdef __cplusplus
}
#endif
#endif
then comb thru the errors. Took me about 15 minutes to get it to compile without any warnings.
franqutrass
Posts: 69
Joined: Wed Dec 30, 2009 6:29 pm
Location: peru
Contact:

Post by franqutrass »

ohh, my god, thanks¡¡¡¡¡¡¡¡
many thanks¡¡¡¡¡¡¡¡¡
you are a GOD
hello
Post Reply