• Advertisement
Sign in to follow this  

UNICODE Mode Required

This topic is 4819 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, Im trying to compile the sample programs that use the framework in the DX9.0c SDK, but it comes up with the following error: 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 I tried adding the following line to the preprocessor bit in the project settings: UNICODE,_UNICODE However, that did not solve the problems. Any suggestions? I'm Using MSVC6 on a Windows XP Platform.

Share this post


Link to post
Share on other sites
Advertisement
That sorted that problem, BUT

I have other problems now:

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.
should not include d3dtypes.h when compiling for DX8 or newer interfaces
z:\dx9csdk\samples\c++\common\dxutmisc.h(651) : error C2065: '__noop' : undeclared identifier
z:\dx9csdk\samples\c++\common\dxutgui.h(12) : fatal error C1083: Cannot open include file: 'usp10.h': No such file or directory

Share this post


Link to post
Share on other sites
No, ive never seen that page before, gonna try it and let you know, and i couldnt post in the other guy's thread, said i didnt have permission to. :S

Thanks for your help

Share this post


Link to post
Share on other sites
Ok, the last error i have now until more pop up is:

z:\dx9csdk\samples\c++\common\dxutmisc.h(651) : error C2065: '__noop' : undeclared identifier

its used in the dxutmisc.h file many times, but is not declared anywhere :(

Share this post


Link to post
Share on other sites
Take a look at what the __noop preprocessor keyword does. It's kind of obscure, but I guess there's a use for everything. [smile]

Basically, it means "I don't want you to execute any function right here. Ignore the parameter list". Citing the MSDN example:


#include <stdio.h>

#if DEBUG
#define PRINT printf
#else
#define PRINT __noop
#endif

void main() {
PRINT("\nhello\n");
}







Compiled with /DDEBUG defined, the code would actually be the following:

void main() {
printf( "\nhello\n" );
}


Compiled without /DDEBUG defined, the code would read:

void main() {
__noop( "\nhello\n" );
}


Since __noop means no operation, nothing will be printed. The final code would be (after the preprocessor is through with it):

void main() {
}


Anyways, VC6 doesn't support __noop. So you have to go through and edit the header manually. If you see a #define with __noop, just remove it. Make sure you save a back-up copy [wink].

Share this post


Link to post
Share on other sites
Theres hundreds of errors in MSVC6 due differences for example:

for(int i =0; i<=9; i++)
{
//BLAHBLAHBLAH
}

MSVC6, i is now a function variable
MSVC7, i only existes within the for loop.

There are many similar errors =(

Share this post


Link to post
Share on other sites
Quote:
Original post by FMDGames
Theres hundreds of errors in MSVC6 due differences for example:

for(int i =0; i<=9; i++)
{
//BLAHBLAHBLAH
}

MSVC6, i is now a function variable
MSVC7, i only existes within the for loop.

There are many similar errors =(

For this specific inconsistency, you can do:
#define for if(0); else for
to overcome it.

Share this post


Link to post
Share on other sites
Quote:
Original post by Coder
For this specific inconsistency, you can do:
#define for if(0); else for
to overcome it.

[dead] hehe that is such an evil trick...almost as bad as:
#define for while(true); for

Share this post


Link to post
Share on other sites
More problems, this time its the dxutsound.h file, with the following :S

e:\system\dx9sdk\dx9csdk\samples\c++\common\dxutsound.h(36) : error C2143: syntax error : missing ';' before '*'
e:\system\dx9sdk\dx9csdk\samples\c++\common\dxutsound.h(36) : error C2501: 'IDirectSound9' : missing storage-class or type specifiers
e:\system\dx9sdk\dx9csdk\samples\c++\common\dxutsound.h(36) : error C2501: 'm_pDS' : missing storage-class or type specifiers
e:\system\dx9sdk\dx9csdk\samples\c++\common\dxutsound.h(43) : error C2146: syntax error : missing ';' before identifier 'GetDirectSound'
e:\system\dx9sdk\dx9csdk\samples\c++\common\dxutsound.h(43) : error C2433: 'LPDIRECTSOUND9' : 'inline' not permitted on data declarations
e:\system\dx9sdk\dx9csdk\samples\c++\common\dxutsound.h(43) : error C2501: 'LPDIRECTSOUND9' : missing storage-class or type specifiers
e:\system\dx9sdk\dx9csdk\samples\c++\common\dxutsound.h(43) : warning C4183: 'GetDirectSound': member function definition looks like a ctor, but name does not match enclosing class

... :( ...

Share this post


Link to post
Share on other sites
That's unusual...my DXUTSound.h file only makes references to IDirectSound8. Are you including Dsound.h before you include DXUTSound.h?

Share this post


Link to post
Share on other sites
Which sample are you trying to compile, exactly? That's unusual that your sample framework is referencing IDirectSound9.

Share this post


Link to post
Share on other sites
Can someone confirm that it works WITHOUT any problems on Visual C++ .NET (7.0) since it looks like im gonna have to buy that to make this work :S :/

Share this post


Link to post
Share on other sites
Quote:
Original post by FMDGames
Can someone confirm that it works WITHOUT any problems on Visual C++ .NET (7.0) since it looks like im gonna have to buy that to make this work :S :/
Yes, I know for a fact that it works. It is definetly a good idea to upgrade, because all support for VC6 is going to be dropped very soon (as in no 'Extras' libraries). Before you go out and spend a lot on VS7 - have you tried VS 2005 Express? The beta is free.

Share this post


Link to post
Share on other sites
Thanks,

I looked at that, and apart from the fact windows.h seems to be missing (linked it with Windows SDK) and works now, but it cannot find the "libcp.lib" file whatever that is.

Man how hard can it be!

Share this post


Link to post
Share on other sites
Ok got it working, but theres about 500 warning messages about "depreiation" methods for doing stuff like strcat etc but i can live with them :P

Share this post


Link to post
Share on other sites
Quote:
Original post by FMDGames
Ok got it working, but theres about 500 warning messages about "depreiation" methods for doing stuff like strcat etc but i can live with them :P
Awesome, so you got the sample(s) compiled and running? Persistence is definetly one of the critical things you need to be successful in graphics programming.

What do you think of VS 2005? Personally, I haven't used it at all.

Share this post


Link to post
Share on other sites
Well the Menu's are in totally different places, and you have to supply the Windows SDK cause it doesnt do it itself, and it cant find Windows.h :S or any libs assoiated with it.

It comes up with some sort of manifest error as well (use F5 to compile, it gives you an option to continue anyway).

Its a bit slow when you change settings, requires you to restart VS8 if u change the directory settings for Includes/Libs.

But all in all need time to get used to it.

Share this post


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

  • Advertisement