🔒 Locked
UNICODE Mode Required
Advertisement
Original Post
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.
Can't you just #define UNICODE?
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
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
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:
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].
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].
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
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
... :( ...
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
... :( ...
That's unusual...my DXUTSound.h file only makes references to IDirectSound8. Are you including Dsound.h before you include DXUTSound.h?
Which sample are you trying to compile, exactly? That's unusual that your sample framework is referencing IDirectSound9.
Quote: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.
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 :/
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement