Sign in to follow this  

Installing the SDK

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

Hello all. I'm new to c++ and new to directx programming. The otherday i tried to install the October release of the directx 9 SDK, however when i run any of the installed samples.I get the following errors: --------------------Configuration: dx9 - Win32 Debug-------------------- Compiling... AntiAlias.cpp NOTE: WINVER has been defined as 0x0500 or greater which enables Windows NT 5.0 and Windows 98 features. When these headers were released, Windows NT 5.0 beta 1 and Windows 98 beta 2.1 were the current versions. For this release when WINVER is defined as 0x0500 or greater, you can only build beta or test applications. To build a retail application, set WINVER to 0x0400 or visit http://www.microsoft.com/msdn/sdk to see if retail Windows NT 5.0 or Windows 98 headers are available. See the SDK release notes for more information. c:\program files\microsoft directx 9.0 sdk (october 2004)\include\dsound.h(305) : error C2146: syntax error : missing ';' before identifier 'dwReserved1' c:\program files\microsoft directx 9.0 sdk (october 2004)\include\dsound.h(305) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers c:\program files\microsoft directx 9.0 sdk (october 2004)\include\dsound.h(305) : error C2501: 'dwReserved1' : missing storage-class or type specifiers c:\program files\microsoft directx 9.0 sdk (october 2004)\include\dsound.h(306) : error C2146: syntax error : missing ';' before identifier 'dwReserved2' c:\program files\microsoft directx 9.0 sdk (october 2004)\include\dsound.h(306) : error C2501: 'DWORD_PTR' : missing storage-class or type specifiers c:\program files\microsoft directx 9.0 sdk (october 2004)\include\dsound.h(306) : error C2501: 'dwReserved2' : missing storage-class or type specifiers c:\c projects\dx9\antialias\antialias\dxut.h(13) : fatal error C1189: #error : "The sample framework requires a Unicode build. If you are using Microsoft Visual C++ .NET, under the General tab of the project properties change the Character Set to ' Use Unicode Character Set'." Error executing cl.exe. dx9.exe - 7 error(s), 0 warning(s) I am currently using visual c++ 6 (standard version), and windows xp. Any ideas or suggestions? Thanks, Hepy

Share this post


Link to post
Share on other sites
Which 'extras' are these? I thought that DX9c SDK was incompatible... can't see anything in the documentation about extras to make it work with VC6. I'd really appreciate it if you could shed some light on this :-)

Share this post


Link to post
Share on other sites
Ok, i've got the extra's do i just drag this into the include and lib folders installed with the sdk? (edit - done this and i still get the same errors)
Hepy

Share this post


Link to post
Share on other sites
Me or Doomhunk, i looked in the first sticky and its says i need the extra's i got these and dragged all the libs and includes into the directx sdk directories and still got them errors.
Thanks,
Hepy

Share this post


Link to post
Share on other sites
Quote:
Original post by Hepy
Me or Doomhunk, i looked in the first sticky and its says i need the extra's i got these and dragged all the libs and includes into the directx sdk directories and still got them errors.
Thanks,
Hepy

- Do you have the platform SDK?
- Add UNICODE and _UNICODE to the project preprocessor definitions.

Share this post


Link to post
Share on other sites
- Do you have the platform SDK?

I'm not sure what you mean here, i just downloaded it from the microsoft site. It's the october release of dx9. I also download the extra's package.

- Add UNICODE and _UNICODE to the project preprocessor definitions.

Like i said i'm very new to dx and c++, i wouldn't know where to put this.
Sorry for my lack of coding knowlegde, but i haven't had the chance to as i can't get this working.
Thanks for any help,
Hepy

Share this post


Link to post
Share on other sites
The platform SDK is the latest Windows headers, libs, and documentation. This is different from the DirectX SDK, which is the headers, libs, and documentation for DirectX.

The headers that ship with VC6 support Win95 features only. The API for Win98 features are beta in the headers that ship with VC6. For instance, you won't have support for the wheel of a wheel mouse without updating these files. In order to get proper support for the latest OS features, you need a new platform SDK. I have no idea if the platform SDKs are still updated for VC6, but there are Win2K headers for VC6. I think there may even be XP headers.

For the unicode, I don't remember the exact menus... try Project/Settings. Compiler or C++ settings. There should be a box for additional preprocessor definitions. Put it there.

Share this post


Link to post
Share on other sites
Quote:
Original post by Namethatnobodyelsetook
For the unicode, I don't remember the exact menus... try Project/Settings. Compiler or C++ settings. There should be a box for additional preprocessor definitions. Put it there.

You're *exactly* right [smile]
Project->Settings, C++ Settings tab, Preprocessor definitions edit box

Share this post


Link to post
Share on other sites
Hi, well that fixed the first 6 errors but this one still remians:

--------------------Configuration: AntiAlias - Win32 Debug--------------------
Compiling...
AntiAlias.cpp
c:\c projects\dx9\antialias\antialias\dxut.h(13) : fatal error C1189: #error : "The sample framework requires a Unicode build. If you are using Microsoft Visual C++ .NET, under the General tab of the project properties change the Character Set to '
Use Unicode Character Set'."
Error executing cl.exe.

AntiAlias.exe - 1 error(s), 0 warning(s)

Even after i have added unicode the preprocessor defintions.
Any ideas :(
Thanks,
Hepy

Share this post


Link to post
Share on other sites
Just do what it says - go to the project settings and change the combobox that says 'Using Multi-Character Set' to 'Unicode character set'. It's not that difficult.

Share this post


Link to post
Share on other sites
Quote:
Original post by darookie
Just do what it says - go to the project settings and change the combobox that says 'Using Multi-Character Set' to 'Unicode character set'. It's not that difficult.

He states in his first post that he's using Visual C++ 6 standard edition.

Share this post


Link to post
Share on other sites
Quote:
Original post by Coder
Quote:
Original post by darookie
Just do what it says - go to the project settings and change the combobox that says 'Using Multi-Character Set' to 'Unicode character set'. It's not that difficult.

He states in his first post that he's using Visual C++ 6 standard edition.

AFAIK there's no difference between VC 6 and above versions regarding UNICODE character set selection. IIRC I could also set the Unicode character set in my project settings with VC6.

Share this post


Link to post
Share on other sites
Hi, thanks for the replies. Here's the requested code:


#ifndef DXUTIL_H
#define DXUTIL_H

//-----------------------------------------------------------------------------
// Miscellaneous helper functions
//-----------------------------------------------------------------------------
#define SAFE_DELETE(p) { if(p) { delete (p); (p)=NULL; } }
#define SAFE_DELETE_ARRAY(p) { if(p) { delete[] (p); (p)=NULL; } }
#define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }



//-----------------------------------------------------------------------------
// Name: DXUtil_GetDXSDKMediaPath()
// Desc: Returns the DirectX SDK path, as stored in the system registry
// during the SDK install.
//-----------------------------------------------------------------------------
const TCHAR* DXUtil_GetDXSDKMediaPath();



Hope that what you were looking for.
Thanks for any help to resolve this problem .
Hepy


Share this post


Link to post
Share on other sites
Hi again, i took into account your suggestion about changing it to unicode. But i'm afraid there is no such a thing for vc++. Any suggestions as i need to get this fixed!

thanks,
Hepy

[Edited by - Hepy on December 16, 2004 10:12:01 AM]

Share this post


Link to post
Share on other sites
Quote:
Original post by darookie
Quote:
Original post by Coder
Quote:
Original post by darookie
Just do what it says - go to the project settings and change the combobox that says 'Using Multi-Character Set' to 'Unicode character set'. It's not that difficult.

He states in his first post that he's using Visual C++ 6 standard edition.

AFAIK there's no difference between VC 6 and above versions regarding UNICODE character set selection. IIRC I could also set the Unicode character set in my project settings with VC6.

No, VC6 doesn't have this.

Share this post


Link to post
Share on other sites
Quote:
Original post by Hepy
Hi, thanks for the replies. Here's the requested code:

*** Source Snippet Removed ***

Hope that what you were looking for.
Thanks for any help to resolve this problem .
Hepy

I'm sorry, I meant the code around line #13 in the file "dxut.h", i.e. the line from which the error originates.

Share this post


Link to post
Share on other sites
Hi, thanks again for the help. Here's the requested snippet:


//--------------------------------------------------------------------------------------
// File: DXUT.h
//
// DirectX SDK Direct3D sample framework
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//--------------------------------------------------------------------------------------
#pragma once
#ifndef DXUT_H
#define DXUT_H

#ifndef UNICODE
#error "The sample framework requires a Unicode build. If you are using Microsoft Visual C++ .NET, under the General tab of the project properties change the Character Set to 'Use Unicode Character Set'."
#endif


//--------------------------------------------------------------------------------------
// Structs
//--------------------------------------------------------------------------------------
class CD3DEnumeration;
class CD3DSettingsDlg;

struct DXUTDeviceSettings
{
UINT AdapterOrdinal;
D3DDEVTYPE DeviceType;
D3DFORMAT AdapterFormat;
DWORD BehaviorFlags;
D3DPRESENT_PARAMETERS pp;
};




Hepy

Share this post


Link to post
Share on other sites
I had this problem before with some code from the internet. I was trying to compile the UNICODE debug version and my compiler wasn't set up for it. Go to where you can choose debug/release builds. There will probably be 4 of them to choose from: 2 unicode, 2 not. Choose one of the not UNICODE.

Share this post


Link to post
Share on other sites

This topic is 4745 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this