I am trying to build the sample code which came with directx sdk, hopefully this is the right place to ask for help.
When I build the sample code from "SimpleSample", I get alot of linker errors:
------ Build started: Project: SimpleSample, Configuration: Debug Win32 ------
Compiling...
dxstdafx.cpp
Compiling...
DXUT.cpp
DXUTenum.cpp
DXUTgui.cpp
DXUTRes.cpp
DXUTmisc.cpp
DXUTSettingsDlg.cpp
SimpleSample.cpp
Generating Code...
Compiling resources...
Linking...
dxut.obj : error LNK2019: unresolved external symbol __imp__SystemParametersInfoW@16 referenced in function "long __cdecl DXUTInit(bool,bool,bool,bool)" ( DXUTInit@@YAJ_N000@Z)
dxutgui.obj : error LNK2001: unresolved external symbol __imp__SystemParametersInfoW@16
dxut.obj : error LNK2019: unresolved external symbol __imp__CommandLineToArgvW@8 referenced in function "void __cdecl DXUTParseCommandLine(void)" ( DXUTParseCommandLine@@YAXXZ)
dxut.obj : error LNK2019: unresolved external symbol __imp__CreateWindowExW@48 referenced in function "long __cdecl DXUTCreateWindow(wchar_t const *,struct HINSTANCE__ *,struct HICON__ *,struct HMENU__ *,int,int)" ( DXUTCreateWindow@@YAJPB_WPAUHINSTANCE__@@PAUHICON__@@PAUHMENU__@@HH@Z)
dxut.obj : error LNK2019: unresolved external symbol __imp__AdjustWindowRect@12 referenced in function "long __cdecl DXUTCreateWindow(wchar_t const *,struct HINSTANCE__ *,struct HICON__ *,struct HMENU__ *,int,int)" ( DXUTCreateWindow@@YAJPB_WPAUHINSTANCE__@@PAUHICON__@@PAUHMENU__@@HH@Z)
dxut.obj : error LNK2019: unresolved external symbol __imp__SetRect@20 referenced in function "long __cdecl DXUTCreateWindow(wchar_t const *,struct HINSTANCE__ *,struct HICON__ *,struct HMENU__ *,int,int)" ( DXUTCreateWindow@@YAJPB_WPAUHINSTANCE__@@PAUHICON__@@PAUHMENU__@@HH@Z)
dxutgui.obj : error LNK2001: unresolved external symbol __imp__SetRect@20
...totally 94.
I just downloaded Visual C++ 2005 Express ed., MS platform SDK and MS DirectX SDK (dec 2005). I use WinXP.
So far I think my problem are in the way I have set up the SDK(s) in VC++. I have traversed help files and tutorials for these specifics, but as I have never set up any of these packages before, I am really tumbeling in the dark. Can anyone point me to what the problem might be Or perhaps better where to find a solution.
I have added these directories:
Executables:
C:\Programfiler\Microsoft Platform SDK\Bin
Includes:
C:\Programfiler\Microsoft Platform SDK\Include
C:\Programfiler\Microsoft DirectX SDK (December 2005)\Include
Libraries:
C:\Programfiler\Microsoft Platform SDK\Lib
C:\Programfiler\Microsoft DirectX SDK (December 2005)\Lib\x86
C:\Programfiler\Microsoft Visual C++ Toolkit 2003\lib
Source:
C:\Programfiler\Microsoft Platform SDK\src\crt

samples from directx SDK fails
Guillermo G.
I hope this helps.
Take care.
Kent McCroskey
I think the above part is your problem. You should be using the sample browser and clicking on "Install Project" rather than going at the files directly. If you explore the directory structure they don't keep the files in the SDK in the same place as they are after installing a project - which would explain the compiler getting confused!
hth
Jack
Jinnyminto
Never mind, I found the solution at 3dbuzz.com
There was a post with this problem
http://www.3dbuzz.com/vbforum/showthread.php s=9282e4160df9076ea7068f587d047866&p=1018721
you need to add the following to Additional dependencies:
kernel32.lib
user32.lib
shell32.lib
Gdi32.lib
Advapi32.lib
the last 2 weren't mentioned at 3dbuzz, but i found them necessary
DR_CHAOS
I'm having the exact same problem with the new Feb06 sdk.
And I used the "install project method"
Has anyone found a solution
DPOMT
It wouldn't make sense if you're running directly from an installed SDK sample, but have you got the "common" folder contents in your solution
A couple of other things - do all other samples fail with the same errors Is this solution created from the "Install Project" link - you're not manually copying the files around are you
hth
I do have the common folder in the solution. I clik File|Open|Project/Solution and select SimpleSample_2005.sln which is located in ..\Microsoft DirectX SDK (December 2005)\Samples\C++\Direct3D\SimpleSample\.Jack
All the other samples also fails during the linker phase.
However I have found a reference in the release notes for buffer overflow detection which can cause these errormessages.
http://msdn.microsoft.com/library/default.asp url=/library/en-us/vccore/html/vclrfgsbuffersecurity.asp
This detection is turned on by default in VC++. I have tried turning it on and off as it is described on that page. Still no luck.
It also mentions:
To resolve these errors you need to specify that the linker should also use bufferoverflowU.lib (assuming that your application targets the user mode and can use Win32 API):
>cl a.cpp bufferoverflowU.lib
Microsoft (R) C/C++ Optimizing Compiler Version 14.00.40310.32 for AMD64
Copyright (C) Microsoft Corporation. All rights reserved.
a.cpp
Microsoft (R) Incremental Linker Version 8.00.40310.31
Copyright (C) Microsoft Corporation. All rights reserved.
/out:a.exe
a.obj
bufferoverflowU.lib
>
Or if you use a two step build process:
>cl –c a.cpp bufferoverflowU.lib
Microsoft (R) C/C++ Optimizing Compiler Version 14.00.40310.32 for AMD64
Copyright (C) Microsoft Corporation. All rights reserved.
a.cpp
>link a.obj bufferoverflowU.lib
Microsoft (R) Incremental Linker Version 8.00.40310.31
Copyright (C) Microsoft Corporation. All rights reserved.
>
AE
It wouldn't make sense if you're running directly from an installed SDK sample, but have you got the "common" folder contents in your solution
A couple of other things - do all other samples fail with the same errors Is this solution created from the "Install Project" link - you're not manually copying the files around are you
hth
Jack
falconair
I resolve this problem with below solution:
1. Goto Option-->Projects-->VC++ Directories
2. Move $(VCInstallDir)PlatformSDK\lib and $(VCInstallDir)PlatformSDK\lib\prerelease to the bottom. They must be under your DirectX lib directory such as C:\Program Files\Microsoft DirectX SDK (June 2006)\Lib\x86.
bigtallim
(Edit due to small font size for some reason)
Ola Sprauten
ConfigSystem error LNK2001: unresolved external symbol _IID_IDirect3DSwapChain9
ConfigSystem error LNK2001: unresolved external symbol _IID_IDirect3DBaseTexture9
ConfigSystem error LNK2019: unresolved external symbol _IID_IDirect3DBaseTexture9 referenced in function "void __cdeclDXUTDisplaySwitchingToRE
ConfigSystem error LNK2001: unresolved external symbol _IID_IDirect3DTexture9
ConfigSystem error LNK2001: unresolved external symbol _IID_IDirect3DCubeTexture9
ConfigSystem error LNK2001: unresolved external symbol _IID_IDirect3DVolumeTexture9
ConfigSystem fatal error LNK1120: 5 unresolved externals
in reply I recieved a suggestion to make sure that I had a recent platform SDK installed. While trying to download the platform SDK I had a freeze of the installation program and had to clean up my registry. Chuck Walbourn told me that he could only suggest that I try to download a newer version of the platform SDK.
After having downloaded the DirectX SDK and trying to run the software, I would also let people know that I have been using an evaluation package of the Visual Studio .NET 2003 version of C++ programming environment for educational purposes, and seeing as how these errors are often caused by hidden compiler codes that link to external code objects that are used for making the executable programs.
If you are using a professional and fully licensed version of the software, I woiuld suggest that you contact Chuck Walbourn of chuckw@windows.microsoft.com SDE, Game Technology Group