# Programming a multiplayer FPS in DirectX

This topic is 3248 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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

##### Share on other sites
Quote:
 Original post by HiddenHaxorHowever 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 number1>..\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.

##### Share on other sites
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.

Joe

##### Share on other sites
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

##### Share on other sites
Some Googling suggests that this can be fixed by adding:

#include <winnt.h>

or:

#include <windows.h>

at the top of resource.rc.

##### Share on other sites
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

Joe

##### Share on other sites
Try adding this after #include <windows.h>:

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

##### Share on other sites
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.

##### Share on other sites
Quote:
 Original post by Gage64Try adding this after #include :#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'

Joe

##### Share on other sites
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).

1. 1
2. 2
Rutin
21
3. 3
4. 4
frob
17
5. 5

• 9
• 12
• 9
• 33
• 13
• ### Forum Statistics

• Total Topics
632595
• Total Posts
3007266

×