0

I'm trying to learn C++ and DirectX, got VS 2012 Express Desktop today for Windows 7. I should probably mention I already had DirectX SDK for VS 2010 installed.

The first of the 7 tutorials will compile fine, the rest are giving errors. Because the first one runs I think my include and library directories are set up fine.

Source is here, I put the .fx file in at the bottom as well as the compiler errors. If you don't want to click megafileupload it's just the DirectX draw a triangle tutorial (2) from Microsoft.

Tutorial files on megaupload

Warning 1   warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/SAFESEH' specification    C:\cpp\DirectX_Tutorial\C++\Tutorial02\Tutorial02.obj   Tutorial02

Error   2   error LNK2019: unresolved external symbol _D3DCompileFromFile@36 referenced in function "long __cdecl CompileShaderFromFile(wchar_t *,char const *,char const *,struct ID3D10Blob * *)" (?CompileShaderFromFile@@YAJPA_WPBD1PAPAUID3D10Blob@@@Z)    C:\cpp\DirectX_Tutorial\C++\Tutorial02\Tutorial02.obj   Tutorial02

Error   3   error LNK1120: 1 unresolved externals   C:\cpp\DirectX_Tutorial\C++\Debug\Tutorial02.exe    Tutorial02

Also is there a forum here I can rant on? C++, the Windows API, DirectX, and Visual Studio are all just so unnecessarily difficult to use.

David_G
  • 1,127
  • 1
  • 16
  • 36

1 Answers1

0

Recheck if your import libraries are correct and if you're importing from the folder corresponding to your processor architecture. Also, double check project's encoding, directx doesnt usually work well on encodings other than Unicode.

Felype
  • 3,087
  • 2
  • 25
  • 36