Jump to content
  • Advertisement
Sign in to follow this  
m4gnus

d3d9.h errors again

This topic is 4761 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

Ok i already opened a thread on that topic recently but probably now someone can help me: I want to compile my engine project including my new DirectInput part but while compiling ngInput.cpp i get syntax errors @ d3d9.h...ngInput.cpp includes: #include "ngInput.h" #include "ngEngine.h" ngInput.h includes: #include <DInput.h> ngEngine.h includes: #include <windows.h> #include "ngConfig.h" #include "ngCamera.h" ngConfig.h includes: -none- ngCamera.h includes: #include <d3dx9.h> ok these headers are all included in ngInput.cpp but could an error @ ngEngine.cpp produce that error? or must the error lie in these headers? Could the error occur because i have Win2k? Microsoft.com said the sdk is for WinXP... Plz help i'm totally stuck...i don't even know where i should search for te error... Edit: Ok forgot to post the Compilerlog: ------ Build started: Project: nGin, Configuration: Debug Win32 ------ Compiling... ngInput.cpp c:\programme\microsoft directx 9.0 sdk (april 2005)\include\dinput.h: DIRECTINPUT_VERSION undefined. Defaulting to version 0x0800 c:\Programme\Microsoft DirectX 9.0 SDK (April 2005)\Include\d3d9.h(58) : error C2143: syntax error : missing ';' before 'string' c:\Programme\Microsoft DirectX 9.0 SDK (April 2005)\Include\d3d9.h(58) : fatal error C1004: unexpected end of file found ngEngine.cpp c:\Dokumente und Einstellungen\gregor\Eigene Dateien\nGin\ngEngine.cpp(99) : warning C4244: '=' : conversion from 'int' to 'float', possible loss of data c:\Dokumente und Einstellungen\gregor\Eigene Dateien\nGin\ngEngine.cpp(82) : warning C4101: 'hResult' : unreferenced local variable c:\Dokumente und Einstellungen\gregor\Eigene Dateien\nGin\ngEngine.cpp(244) : error C2039: 'SendMessageA' : is not a member of 'ngEngine' c:\Dokumente und Einstellungen\gregor\Eigene Dateien\nGin\ngEngine.h(10) : see declaration of 'ngEngine' c:\Dokumente und Einstellungen\gregor\Eigene Dateien\nGin\ngEngine.cpp(244) : error C2065: 'ngMSG' : undeclared identifier c:\Dokumente und Einstellungen\gregor\Eigene Dateien\nGin\ngEngine.cpp(244) : error C2146: syntax error : missing ')' before identifier 'MSG' c:\Dokumente und Einstellungen\gregor\Eigene Dateien\nGin\ngEngine.cpp(244) : error C2182: 'SendMessageA' : illegal use of type 'void' c:\Dokumente und Einstellungen\gregor\Eigene Dateien\nGin\ngEngine.cpp(244) : error C2365: 'SendMessageA' : redefinition; previous definition was a 'function' c:\Programme\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\WinUser.h(3045) : see declaration of 'SendMessageA' c:\Dokumente und Einstellungen\gregor\Eigene Dateien\nGin\ngEngine.cpp(244) : error C2059: syntax error : ')' c:\Dokumente und Einstellungen\gregor\Eigene Dateien\nGin\ngEngine.cpp(244) : error C2143: syntax error : missing ';' before '{' c:\Dokumente und Einstellungen\gregor\Eigene Dateien\nGin\ngEngine.cpp(244) : error C2447: '{' : missing function header (old-style formal list?) Generating Code... Build log was saved at "file://c:\Dokumente und Einstellungen\gregor\Eigene Dateien\nGin\Debug\BuildLog.htm" nGin - 10 error(s), 2 warning(s) ---------------------- Done ---------------------- Build: 0 succeeded, 1 failed, 0 skipped btw. ignore the other errors i'm just interested in the first 3... regards, m4gnus

Share this post


Link to post
Share on other sites
Advertisement
*bump* btw. in another thread i read that i should uninstall my older sdk if i install a new one and i didn't do that so could that be the problem? If not what's the consequence of that?

regards,
m4gnus

Share this post


Link to post
Share on other sites
There are a number of errors that seem to appear obvious. I will show you each one.

DIRECTINPUT_VERSION undefined
This is just a warning that you haven't set the default directinput version for the header file dinput.h, it will default to the right version though, no worry.

error C2143: syntax error : missing ';' before 'string'
This could mean a header file is not included that defines the type string. You also have to do "using namespace std;" so string becomes visible to the compiler.

For the rest of the errors, I think you may need to include <windows.h> and <dinput.h> and purhaps other header files before you include <ngengine.h>. They maybe expecting you to include those first. If thats not the case then I think the errors are involved in source code you have not shown.

Share this post


Link to post
Share on other sites
yeah i just worry about the errors with d3d9.h . Can you tell me which .h file is probably missing? I posted all my includes so if a file is missing someone could tell me which?
THX for answer...i almost gave up all hope..

regards,
m4gnus

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!