Jump to content
  • Advertisement
Sign in to follow this  
Tesl

DX9 with Visual Studio 2005 (Beta)

This topic is 4837 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 there, iv done a fair bit of DirectX programming in the past using Visual Studio 6.0, and never had any problems using the DirectX API. Im using the Beta version of the new visual studio (if that is a problem then please let me know, id be quite happy to shell out for 2003 if need be) and have been having problems simply compiling a simple DX app! I (think) iv set the paths correctly for the required library files (adding both the DXSDK/lib and /header files by going Tools > Options > Projects > VC++ Dirs) I also entered d3d9.lib, d3dx9.lib and winmm.lib as additional required dependencies for the project. However, when compiling i am always getting a compilation error (not a linking error strangely) in the file winnt.h. Since obviously this is not a file i wrote (i guess its possible it actually IS buggy since this is a beta VC?) My output log is as follows: ------ Build started: Project: Dissertation, Configuration: Debug Win32 ------ Compiling... main.cpp c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(222) : error C2146: syntax error : missing ';' before identifier 'PVOID64' c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(222) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(5932) : error C2146: syntax error : missing ';' before identifier 'Buffer' c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(5932) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\program files\microsoft visual studio 8\vc\platformsdk\include\winnt.h(5932) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int c:\documents and settings\win xp\my documents\visual studio 2005\projects\dissertation\dissertation\main.cpp(142) : error C2440: 'initializing' : cannot convert from 'const char [13]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\win xp\my documents\visual studio 2005\projects\dissertation\dissertation\main.cpp(148) : error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const char [13]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast c:\documents and settings\win xp\my documents\visual studio 2005\projects\dissertation\dissertation\main.cpp(163) : error C2664: 'UnregisterClassW' : cannot convert parameter 1 from 'const char [13]' to 'LPCWSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast Build log was saved at "file://c:\Documents and Settings\Win XP\My Documents\Visual Studio 2005\Projects\Dissertation\Dissertation\Debug\BuildLog.htm" Dissertation - 8 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== Obviously im finding this just a little bit strange, but hoped id find some help here. Im assuming iv done something (or missed something out) in the setup with the Beta version, but i cant quite work this one out. Any help would be massively appreciated (even if that advice is only go out and buy a stable IDE :D) Thanks in advance :)

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
For compile a project i must remplace include visual studio file winnt.h and other by an older version.
But i have some problem to compile again, LongMsgPointer ....

Share this post


Link to post
Share on other sites
*bump*

(i usually hate it when people do this, so i wont bump again if it falls off the front page, i just really could do with a bit of help :))

Share this post


Link to post
Share on other sites
What happens when you compile the project in ANSI (non-Unicode) mode?
Oh, and you should link to the debug versions of DirectX when you are doing a debug build.

Share this post


Link to post
Share on other sites
Quote:
Original post by Konfusius
What happens when you compile the project in ANSI (non-Unicode) mode?


Im still not that familiar with Visual Studio, and i cant find a way to do that...?

Sorry my usual environment is Linux with GCC, I havent coded with DX in a fair while so struggling to find my way around VS .net =/

Share this post


Link to post
Share on other sites
Quote:
Original post by Konfusius
What happens when you compile the project in ANSI (non-Unicode) mode?


The errors in winnt.h dont dissappear, but the other 3 conversion errors have gone.

I guess thats some progress :]

Share this post


Link to post
Share on other sites
Hi Sava,

Make sure that platform SDK includes are at the top of your include directory list in VC Express. If the DXSDK directories are first you will get these C2146 errors.

Other words of advice is to make sure you use the include directories from the last platform SDK, (not just the DXSDK). If you don't bad things will happen.

There's a couple odd linking and include errors I came across getting used to VC express (I'm using it now for all my DX work so it is possible!).

Good luck,
- James

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!