Don't know if anyone here will be able to help me - but here I go.

I'm reading Beginning Game Design by Jonathon S. Harbour. In a chapter on DirectSound, the author says to go the DirectX SDK, and then go to \samples\c++\common to get four files (dsutil.h, dxutil.h, dsutil.cpp, and dxutil.cpp), and add them as source/header files in the project. The thing is, the edition of the book I have is old, and is using an older SDK (still version 9, though). In the SDK I have (August 2007), there is no \common directory within \samples\c++. I started a thread on the author's personal forum (jharbour.com/forum), asking what the "new" versions of there four files were. Mr. Harbour responded saying that the files could be downloaded from his site. So I download them, decompress the .rar, and get the files I need. I type the rest of the code, try to compile, but it won't work because one of the four files I got from the .rar requires another file, dxstdafx.h. I find the source for that file on krugle.org, and then find out that dxstdafx.h needs other files: DXUT.h, and other header files that start with DXUT. All of these files were in my version of the SDK, so I added that directory to my complier's include directories, compile a third time, and now I get some message saying that the character encoding needs to be in unicode (no idea what that means), and it tells me to go to the project's setting and change a setting. I do that, and I get a whole bunch of other errors. I change it back, but I'm still getting those errors that I wasn't getting before I changed the character set in the project properties.

So... at that point I figure I'm going too deep into things that I don't have too much knowledge on.

Now, if anyone actually read this far, can you try to help me understand what's going on and how to get this project to compile? I realize this can all be solved by downgrading my SDK, but I'd rather not have to do that. Does anyone know what the "new" dsutil.h, dxutil.h, dsutil.cpp, and dxutil.cpp are, or if they even exist in newer SDKs?

Please and thank you.

Recommended Answers

All 4 Replies

What compiler are you using? VC++ 2005 or VC++ 2008 ? Those two compilers enable UNICODE by default. UNICODE is a standardized way to use non-English languages is programs and requires some changes to standard C or C++ character arrays. If you don't care about foreign languages then you should just turn UNCODE off, as you have already apparently done.

Beyond that, sorry but I can't help you.

What compiler are you using? VC++ 2005 or VC++ 2008 ? Those two compilers enable UNICODE by default. UNICODE is a standardized way to use non-English languages is programs and requires some changes to standard C or C++ character arrays. If you don't care about foreign languages then you should just turn UNCODE off, as you have already apparently done.

Beyond that, sorry but I can't help you.

I'm using 2008. They enable unicode by default? When I initially looked at the project properties the character set was on "Use Multi-Byte Character Set".

yup -- that means UNICODE. Set it to "Not set"

yup -- that means UNICODE. Set it to "Not set"

Wait, Use Multi-Byte Character Set means unicode?

In that case, what does Use Unicode Character Set mean?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.