FAQ  •  Register  •  Login

KMQuake 2 source code error

Moderator: Inside3D Admins

<<

franqutrass

User avatar

Posts: 64

Joined: Wed Dec 30, 2009 6:29 pm

Location: peru

Post Sun Jan 23, 2011 1:31 am

KMQuake 2 source code error

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_020_b3_htfx3_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: 2510

Joined: Fri Nov 05, 2004 3:12 am

Location: UK

Post Sun Jan 23, 2011 2:03 am

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

User avatar

Posts: 3365

Joined: Tue Mar 14, 2006 5:15 am

Post Sun Jan 23, 2011 2:15 am

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:

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

User avatar

Posts: 64

Joined: Wed Dec 30, 2009 6:29 pm

Location: peru

Post Sun Jan 23, 2011 3:54 am

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

User avatar

Posts: 64

Joined: Wed Dec 30, 2009 6:29 pm

Location: peru

Post Sun Jan 23, 2011 4:26 am

Search and already found what I think is the file "afxres.h" of this web page: "http://www.koders.com/c/fid533F9524B20EA8D5FD2C782017B543EDAFAF6711.aspx?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: 1055

Joined: Sat Nov 13, 2004 10:39 pm

Post Sun Jan 23, 2011 9:01 am

in the .rc file replace the "afxres.h" with "windows.h"
then add this right after that...
  Code:
#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

User avatar

Posts: 64

Joined: Wed Dec 30, 2009 6:29 pm

Location: peru

Post Sun Jan 23, 2011 4:52 pm

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

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.
Icons provided by Aha Soft