Programming a multiplayer FPS in DirectX

Started by
31 comments, last by HiddenHaxor 14 years, 5 months ago
Hi, Ive recently purchased the book in the title, and I'm really desperate to look t hrough all the source code, and play about with some things (as well as adding some DirectX effects from my DirectX book I've also purchased). However on trying to compile my code in Visual Studio 2008 Express, I get the following errors: 1>..\Engine\Resource.rc(19) : error RC2144 : PRIMARY LANGUAGE ID not a number 1>..\Engine\Resource.rc(28) : error RC2135 : file not found: 144 My line 19 says: LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_AUS and my line 25 says: IDD_GRAPHICS_SETTINGS DIALOG DISCARDABLE 0, 0, 290, 185 I really can't figure out how to do this O_O. I think I may have gone in a bit over what I can do since so far I have only done C++ console apps. I have purchased some more basic C++ dummies books (console and win32 programming), so should hopefully fly through the basics. So basically for now, I would like some advice (or even better just a fix(and of course what was wrong before)) on how to fix the issue. Pleasae Help, Thanks In Advance, Joe
__________________________http://www.dev-hq.co.ukhttp://forum.dev-hq.co.uk
Advertisement
Quote:Original post by HiddenHaxor
However on trying to compile my code in Visual Studio 2008 Express, I get the following errors:

1>..\Engine\Resource.rc(19) : error RC2144 : PRIMARY LANGUAGE ID not a number
1>..\Engine\Resource.rc(28) : error RC2135 : file not found: 144

Is there a line like this in Resource.rc that is commented out?:
#include "afxres.h"
If so, uncomment it, and try compiling again.

Quote:
I think I may have gone in a bit over what I can do since so far I have only done C++ console apps. I have purchased some more basic C++ dummies books (console and win32 programming), so should hopefully fly through the basics.


This area (resources) is really a Windows application (in general) development topic, so hopefully that Windows programming book will help you in this regard.
Now I get:


1>..\Engine\Resource.rc(4) : fatal error RC1015: cannot open include file 'afxres.h'.



I think this is because I have visual studio 2008 express.



Please Help,

Thanks In Advance,



Joe
__________________________http://www.dev-hq.co.ukhttp://forum.dev-hq.co.uk
Have you installed the latest (or at least some version) of the Windows SDK (formerly Platform SDK)? The language IDs (LANG_ENGLISH and SUBLANG_ENGLISH_AUS) are defined by it (in the header file winnt.rh for me). If not you'll need to install that first, then try recompiling.

As a cheap alternative, if you're just busting to get some code working, the numeric value for LANG_ENGLISH is 9, and 3 for SUBLANG_ENGLISH_AUS, so you could just replace the lines with (there may be more than one):
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_AUS
to just:
LANGUAGE 9, 3
Some Googling suggests that this can be fixed by adding:

#include <winnt.h>

or:

#include <windows.h>

at the top of resource.rc.
I think i've already installed the SDK thingy.

And with windows.h I get the error:

1>..\Engine\Resource.rc(34) : error RC2104 : undefined keyword or key name: IDC_STATIC


and with winnt.h I get:

1>..\Engine\Resource.rc(30) : error RC2104 : undefined keyword or key name: DS_MODALFRAME




Thanks In Advance,


Joe
__________________________http://www.dev-hq.co.ukhttp://forum.dev-hq.co.uk
Try adding this after #include <windows.h>:

#ifdef IDC_STATIC#undef IDC_STATIC#endif#define IDC_STATIC (-1)
Is the folder Microsoft Platform SDK\include\mfc (or whatever is appropriate for your version/installation) in MSVS's directory settings to be searched for include files? That is where afxres.h is, which defines IDC_STATIC (as Gage64 provided above). If it isn't, try adding it in, and compiling with just afxres.h included.
Quote:Original post by Gage64
Try adding this after #include <windows.h>:

#ifdef IDC_STATIC#undef IDC_STATIC#endif#define IDC_STATIC (-1)


Ok.. Im makuing progress.

Now I get these errors and warnings though:

1>Engine.lib(SceneObject.obj) : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:ICF' specification
1>LINK : fatal error LNK1104: cannot open file 'libcp.lib'


Once again thanks in advance,


Joe
__________________________http://www.dev-hq.co.ukhttp://forum.dev-hq.co.uk
Go to Project -> Properties -> C/C++ -> Code Generation, and select a different option for the Runtime Library on the right (I'm not sure which one).

This topic is closed to new replies.

Advertisement