Compiling NVIDIA SDK 9.5 w/Express 2005...

Started by
1 comment, last by dgreen02 17 years, 3 months ago
Hey guys... I'm just trying to compile the Nvidia SDK 9.5 projects under Visual C++ Express 2005. I'm using the newest DXSDK December '06. And all the DirectX samples compile fine. First off, I suppose the Nvidia SDK projects were created using 2003, because they had to be converted to the 2005 format when they were opened. The conversion goes fine, but trying to comile produces the following error...
Quote:c:\program files\microsoft visual studio 8\vc\include\tchar.h(26) : fatal error C1189: #error : Need to include strsafe.h after tchar.h
I make the requested change, putting #include <tchar.h> above #include <strsafe.h> in the dxstdafx.h file....Compiling at that point produces the following linker errors [using the MeshMender App as an example]...
Quote: error LNK2019: unresolved external symbol "long __cdecl DXUTCreateWindow(wchar_t const *,struct HINSTANCE__ *,struct HICON__ *,struct HMENU__ *,int,int)" (?DXUTCreateWindow@@YAJPB_WPAUHINSTANCE__@@PAUHICON__@@PAUHMENU__@@HH@Z) referenced in function _WinMain@16 error LNK2019: unresolved external symbol "public: long __thiscall CDXUTDialog::AddStatic(int,wchar_t const *,int,int,int,int,bool,class CDXUTStatic * *)" (?AddStatic@CDXUTDialog@@QAEJHPB_WHHHH_NPAPAVCDXUTStatic@@@Z) referenced in function "void __cdecl InitApp(void)" (?InitApp@@YAXXZ) error LNK2019: unresolved external symbol "public: long __thiscall CDXUTDialog::AddCheckBox(int,wchar_t const *,int,int,int,int,bool,unsigned int,bool,class CDXUTCheckBox * *)" (?AddCheckBox@CDXUTDialog@@QAEJHPB_WHHHH_NI1PAPAVCDXUTCheckBox@@@Z) referenced in function "void __cdecl InitApp(void)" (?InitApp@@YAXXZ) error LNK2019: unresolved external symbol "public: long __thiscall CDXUTDialog::AddButton(int,wchar_t const *,int,int,int,int,unsigned int,bool,class CDXUTButton * *)" (?AddButton@CDXUTDialog@@QAEJHPB_WHHHHI_NPAPAVCDXUTButton@@@Z) referenced in function "void __cdecl InitApp(void)" (?InitApp@@YAXXZ) error LNK2019: unresolved external symbol "long __stdcall DXUTTrace(char const *,unsigned long,long,wchar_t const *,bool)" (?DXUTTrace@@YGJPBDKJPB_W_N@Z) referenced in function "long __stdcall OnCreateDevice(struct IDirect3DDevice9 *,struct _D3DSURFACE_DESC const *,void *)" (?OnCreateDevice@@YGJPAUIDirect3DDevice9@@PBU_D3DSURFACE_DESC@@PAX@Z) error LNK2019: unresolved external symbol "wchar_t const * __cdecl DXUTGetDeviceStats(void)" (?DXUTGetDeviceStats@@YAPB_WXZ) referenced in function "void __cdecl RenderText(void)" (?RenderText@@YAXXZ) error LNK2019: unresolved external symbol "public: long __thiscall CDXUTTextHelper::DrawTextLine(wchar_t const *)" (?DrawTextLine@CDXUTTextHelper@@QAEJPB_W@Z) referenced in function "void __cdecl RenderText(void)" (?RenderText@@YAXXZ) error LNK2019: unresolved external symbol "wchar_t const * __cdecl DXUTGetFrameStats(void)" (?DXUTGetFrameStats@@YAPB_WXZ) referenced in function "void __cdecl RenderText(void)" (?RenderText@@YAXXZ) error LNK2019: unresolved external symbol "public: long __thiscall CDXUTStatic::SetText(wchar_t const *)" (?SetText@CDXUTStatic@@QAEJPB_W@Z) referenced in function "void __stdcall OnGUIEvent(unsigned int,int,class CDXUTControl *,void *)" (?OnGUIEvent@@YGXIHPAVCDXUTControl@@PAX@Z) error LNK2019: unresolved external symbol "public: long __thiscall CDXUTMesh::Create(struct IDirect3DDevice9 *,wchar_t const *)" (?Create@CDXUTMesh@@QAEJPAUIDirect3DDevice9@@PB_W@Z) referenced in function "long __cdecl LoadMeshHelperFunction(class CDXUTMesh *,class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class std::allocator<wchar_t> >,struct IDirect3DDevice9 *)" (?LoadMeshHelperFunction@@YAJPAVCDXUTMesh@@V?$basic_string@_WU?$char_traits@_W@std@@V?$allocator@_W@2@@std@@PAUIDirect3DDevice9@@@Z) error LNK2019: unresolved external symbol "public: __thiscall CDXUTMesh::CDXUTMesh(wchar_t const *)" (??0CDXUTMesh@@QAE@PB_W@Z) referenced in function "void __cdecl `dynamic initializer for 'g_TheMesh''(void)" (??__Eg_TheMesh@@YAXXZ)
There are a few things I've tried at this point, none with very good results...because the only DX Framework file they included with their apps was dxstdafx.h I'm not sure what version of the SDK / helper files I need to compile the SDK... I noticed they link DXUT.lib in with their example apps, while the DXSDK does not, I tried including the DX Framework files directly in the project as they do in the DXSDK samples, but that causes a lot more problems w/undefined functions and different parameters. I've tried a few other things along those lines with no results... Has anybody got this thing to build under 2005 Express w/ the Dec '06 DXSDK? I've been searching around and working on this issue for a few hours now....any help would be appreciated. - Dan
Advertisement
Not tried this myself, but a quick idea (maybe more tomorrow when I feel more awake [wink]) - SDK homepage refers to June 2005 SDK as being required which I'd take as meaning its written against the June 2005 DXUT...

Failing that, there should be a DXUT solution in %DXSDKDIR%\Samples\C++\DXUT\ that can be used to build the .LIB files. Normally its not required, but generating the LIB's and then linking against them may well sort you out.

hth
Jack

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

Alright...I got the samples compiling using the June 2005 SDK. I must have missed that notice when d/ling the SDK. Or figured their website was a little out of date [grin].

It turned out that just including the June 2005 libs + headers didn't fix the problem though. I was looking around the NVidia SDK because I couldn't believe that they wouldn't include their version of the framework files...and sure enough they are in the SDK9.5\Libs\Inc\DXUT\ and SDK 9.5\Libs\Src\DXUT\ directories.

I moved all the files from those two directories over to the Demos\Direct3D9\inc\shared\ folder and added the 7 .cpp files [ dxstdafx.cpp, DXUT.cpp, DXUTenum.cpp, DXUTgui.cpp, DXUTMesh.cpp, DXUTmisc.cpp, DXUTSettingsDlg.cpp ] to whatever project's workspace I want to compile. That, along with the earlier edit to the dxstdafx.h file, allowed the samples to compile...I'm sure there's a better/easier way to do it, but now I can get on with what I actually had to do in the first place.

Thanks for the help Jack. I've already rate++ you ;-/

- Dan

This topic is closed to new replies.

Advertisement