Sign in to follow this  
TheKrust

OpenGL DirectX SDK's don't compile...

Recommended Posts

As far as free tutorials for advanced topic go, it's becoming painfully clear that I will have to resort to the DirectX SDK samples for help with these topics. Now every time I try to compile the code with Visual Studio 2005, it always gives me a bunch of "misssing resource" errors. If it's not a DLL, it's a pre-compiled header. If it's not a pre-compiled header, it's a shader or FX file. Is there something I'm missing that will allow these things to compile? I do not have access to the specific error logs right now. I will post when I get the chance. Additionaly, does anyone know where I can get a tutorial for shadow mapping or shadow volumes (using the GPU)? (please do not post any links for OpenGL, XNA or "theory pages". Those do not help)

Share this post


Link to post
Share on other sites
I apologize if you've already done these things, but these gave me this sort of problem before:

1) You have to let visual studio know where the directx sdk files are located. You go under "Tools" and set directories (I believe you set a directory for .lib files and another for .h files.)

2) Also, for your specific project you must go under Project Properties (or Project Settings - I can't remember which) to "Additional Dependencies" and list all the .lib files from the SDK you need to use.

Sorry again if you already knew all that . . .

Share this post


Link to post
Share on other sites
Completley understandable. As for #2, I am %100 sure I've done it. As for #1, I'm pretty sure, but I guess I need to double check. Like I said though, I can post the error logs later so people can have a more detailed view.

Share this post


Link to post
Share on other sites
How are you getting the samples? Just navigating to the samples directory in the DX installation location won't work correctly.

To install a sample, you need to open the sample browser, find the sample, and use "Install Sample". It will then let you select a location, and install the sample to that location.

If you've been messing around with the original files in the install dir, I'd recommend you revert them back to the originals before trying to install samples.

If you're already doing this, and this isn't working, could you please provide some more details about the files missing and the samples you're using?

Share this post


Link to post
Share on other sites
I did everything everyone said, but I'm still getting 4 errors

1>Linking...

1>DXUT1.obj : error LNK2019: unresolved external symbol __imp__CommandLineToArgvW@8 referenced in function "void __cdecl DXUTParseCommandLine(wchar_t *)" (?DXUTParseCommandLine@@YAXPA_W@Z)

1>DXUT1.obj : error LNK2019: unresolved external symbol __imp__ExtractIconW@12 referenced in function "long __stdcall DXUTCreateWindow(wchar_t const *,struct HINSTANCE__ *,struct HICON__ *,struct HMENU__ *,int,int)" (?DXUTCreateWindow@@YGJPB_WPAUHINSTANCE__@@PAUHICON__@@PAUHMENU__@@HH@Z)

1>DXUTmisc1.obj : error LNK2019: unresolved external symbol __imp__ShellExecuteW@24 referenced in function "bool __cdecl DXUTReLaunchMediaCenter(void)" (?DXUTReLaunchMediaCenter@@YA_NXZ)

1>SDKmisc.obj : error LNK2019: unresolved external symbol __imp__SHGetFolderPathW@20 referenced in function "void __stdcall DXUTDisplaySwitchingToREFWarning(enum DXUTDeviceVersion)" (?DXUTDisplaySwitchingToREFWarning@@YGXW4DXUTDeviceVersion@@@Z)

1>Debug\ShadowVolume.exe : fatal error LNK1120: 4 unresolved externals

Share this post


Link to post
Share on other sites
Quote:
Original post by TheKrust
I did everything everyone said, but I'm still getting 4 errors

1>Linking...

1>DXUT1.obj : error LNK2019: unresolved external symbol __imp__CommandLineToArgvW@8 referenced in function "void __cdecl DXUTParseCommandLine(wchar_t *)" (?DXUTParseCommandLine@@YAXPA_W@Z)

1>DXUT1.obj : error LNK2019: unresolved external symbol __imp__ExtractIconW@12 referenced in function "long __stdcall DXUTCreateWindow(wchar_t const *,struct HINSTANCE__ *,struct HICON__ *,struct HMENU__ *,int,int)" (?DXUTCreateWindow@@YGJPB_WPAUHINSTANCE__@@PAUHICON__@@PAUHMENU__@@HH@Z)

1>DXUTmisc1.obj : error LNK2019: unresolved external symbol __imp__ShellExecuteW@24 referenced in function "bool __cdecl DXUTReLaunchMediaCenter(void)" (?DXUTReLaunchMediaCenter@@YA_NXZ)

1>SDKmisc.obj : error LNK2019: unresolved external symbol __imp__SHGetFolderPathW@20 referenced in function "void __stdcall DXUTDisplaySwitchingToREFWarning(enum DXUTDeviceVersion)" (?DXUTDisplaySwitchingToREFWarning@@YGXW4DXUTDeviceVersion@@@Z)

1>Debug\ShadowVolume.exe : fatal error LNK1120: 4 unresolved externals


You're not linking against the appropriate libraries to get the Windows API functions.

If you do "install sample" as Sirob said, then you will have a project file that has the necessary linker inputs to obtain basic Win32 API function references. So I don't think you quite did everything that has been posted here.

To identify which libraries you need to include, look at the API documentation for each function not found, i.e. ShellExecute, and look at the bottom of the page where it lists the header file to include and the link library to include.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this