Jump to content
  • Advertisement
Sign in to follow this  
HiddenHaxor

Programming a multiplayer FPS in DirectX

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
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.

Share this post


Link to post
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.



Please Help,

Thanks In Advance,



Joe

Share this post


Link to post
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 this post


Link to post
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 this post


Link to post
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




Thanks In Advance,


Joe

Share this post


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

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

Share this post


Link to post
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 this post


Link to post
Share on other sites
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

Share this post


Link to post
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).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!