Author Topic: DXUT requires a unicode build.  (Read 13568 times)

All0i5hu5

  • Guest
DXUT requires a unicode build.
« on: November 10, 2005, 10:22:57 pm »
BUILD LOG
********************************************************************
Project   : SimpleSample
Compiler  : Microsoft Visual C++ Toolkit 2003 (called directly)
Directory : C:\Documents and Settings\Aardvarkius\My Documents\Projects\SimpleSample\
--------------------------------------------------------------------------------
Switching to target: default
cl.exe /nologo    /W2 /W1    /I"C:\Program Files\Microsoft DirectX 9.0 SDK (October 2005)\Include" /I"C:\Program Files\Microsoft Visual C++ Toolkit 2003\include" /I"C:\Program Files\Microsoft Platform SDK\Include" /c Common\DXUT.cpp /Fo.objs\Common\DXUT.obj
DXUT.cpp
cl : Command line warning D4025 : overriding '/W2' with '/W1'
c:\Documents and Settings\Aardvarkius\My Documents\Projects\SimpleSample\Common\DXUT.h(11) : fatal error C1189: #error :  "DXUT requires a Unicode build. See the nearby comments for details"
Process terminated with status 1 (0 minutes, 2 seconds)
1 errors, 0 warnings
 
***************************************************************

Nearby comments:
***************************************************************
//
// 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'. 
//
// Windows XP and later are native Unicode so Unicode applications will perform better. 
// For Windows 98 and Windows Me support, consider using the Microsoft Layer for Unicode (MSLU). 
//
// To use MSLU, link against a set of libraries similar to this
//      /nod:kernel32.lib /nod:advapi32.lib /nod:user32.lib /nod:gdi32.lib /nod:shell32.lib /nod:comdlg32.lib /nod:version.lib /nod:mpr.lib /nod:rasapi32.lib /nod:winmm.lib /nod:winspool.lib /nod:vfw32.lib /nod:secur32.lib /nod:oleacc.lib /nod:oledlg.lib /nod:sensapi.lib UnicoWS.lib kernel32.lib advapi32.lib user32.lib gdi32.lib shell32.lib comdlg32.lib version.lib mpr.lib rasapi32.lib winmm.lib winspool.lib vfw32.lib secur32.lib oleacc.lib oledlg.lib sensapi.lib dxerr9.lib dxguid.lib d3dx9d.lib d3d9.lib comctl32.lib
// and put the unicows.dll (available for download from msdn.microsoft.com) in the exe's folder.
//
// For more details see the MSDN article titled:
// "MSLU: Develop Unicode Applications for Windows 9x Platforms with the Microsoft Layer for Unicode"
// at http://msdn.microsoft.com/msdnmag/issues/01/10/MSLU/default.aspx
**************************************************************************************

Alright....I used Microsoft Visual Studio Pro 2003 for quite awhile. I deleted it, and decided I would try the free tools in the meantime, while I await the 2005 edition.

I have stormed these forums for two days, trying to compile various sample projects.

My first one was compiling the source for a program created with the MSVS2003 AppWizard for a C++ Win32 Application. This just popped up a blank window with a blackbackground with the options to exit, and about.

My first try, I imported the solution. I could not get the thing to compile, even though I have installed MS C++ Toolkit and Platform SDK.

I worked with it forever yesterday, and was finally able to get it to compile by not importing the solution, but creating a new Win32 application and then adding all of the files from the original project. It now compiles wonderfully.

Task 2 was to get DirectX working. I downloaded DirectX SDK.
However, when I try to compile a simple sample application (found inside of the samples in the SDK), I get the above error. I am almost positive I already have the correct libs added in the compiler settings.

I saw a solution to this in one of the other forums, but the answer was not specific enough. Apparently I am slow.
Will I need to add some more library paths to get this to work?

Will someone throw me a bone, and lets see if we can get this sample to compile on my machine? I would very much appreciate the help. I didn't have to do any of that stuff with MSVS, but I am willing to work at getting this to work, if I can get some pointers in the right direction.

Thanks.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: DXUT requires a unicode build.
« Reply #1 on: November 10, 2005, 10:36:58 pm »
Add UNICODE in "Project->Build options->Compiler->#defines"...
Be patient!
This bug will be fixed soon...

All0i5hu5

  • Guest
Re: DXUT requires a unicode build.
« Reply #2 on: November 10, 2005, 10:49:22 pm »
Add UNICODE in "Project->Build options->Compiler->#defines"...

That was all that was required? I feel silly now. I was expecting some kind of crazy lunar explanation. Simple. I had looked around the IDE and looked for a clickable box that would do the function.

My code still didn't compile, but the error I am getting now is a header not found....I can work through that.

Thanks a bunch.

shamyland

  • Guest
Re: DXUT requires a unicode build.
« Reply #3 on: December 10, 2005, 06:54:37 pm »
I'm getting the same error. I changed the character set to 'use Unicode Character set' and it's still giving me the same error.
I'm using MS VS.NET and the Project item in the menue doesn't have the option Build options->Compiler->#defines can someone help please I need an answer ASAP.
Thnx

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: DXUT requires a unicode build.
« Reply #4 on: December 10, 2005, 07:09:42 pm »
I'm getting the same error. I changed the character set to 'use Unicode Character set' and it's still giving me the same error.
I'm using MS VS.NET and the Project item in the menue doesn't have the option Build options->Compiler->#defines can someone help please I need an answer ASAP.
Thnx


Then what are you doing here, asking questions about MSVC?!? :shock:
This forum is for Code::Blocks IDE related questions, it's not a general programming forum.
Be patient!
This bug will be fixed soon...

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: DXUT requires a unicode build.
« Reply #5 on: December 10, 2005, 07:45:49 pm »
I'm getting the same error. I changed the character set to 'use Unicode Character set' and it's still giving me the same error.
I'm using MS VS.NET and the Project item in the menue doesn't have the option Build options->Compiler->#defines can someone help please I need an answer ASAP.
Thnx
Hmmm, strange. I have:

project->DXTU properties->General->Characters set->"Use Unicode Character Set"

and my compiler command line looks like:

Quote
/Od /D "WIN32" /D "_DEBUG" /D "_LIB" /D "_UNICODE" /D "UNICODE" /Gm /EHsc /RTC1 /MTd /Yu"dxstdafx.h" /Fp"Debug/DXUT.pch" /Fo"Debug/" /Fd"Debug/vc70.pdb" /W3 /nologo /c /Wp64 /ZI /TP

Try to add UNICODE and/orĀ  _UNICODE to the C/C++->Preprocessor->Preprocessor Definitions.

If this does not help, then you can try to post your question in a MS Visual Studio forum :wink:.

Michael