UNICODE Mode Required

Started by
21 comments, last by FMDGames 19 years, 5 months ago
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.
Advertisement
Can't you just #define UNICODE?
Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )
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
The poster in this thread has the same problem as you. Have you tried reading this page before?
Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )
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
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 :(
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#endifvoid 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].
Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )
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 =(
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.

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
Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )

This topic is closed to new replies.

Advertisement