DirectX11 Visual Studio 2017 Link Errors!

Hello all. I am very new to DirectX programming and am trying to learn the basics following the tutorial from Rastertek. Obviously, this is an outdated tutorial and as such there are issues trying to get it to work with Visual Studio 2017. I managed to fix the problems I had with the first tutorial where we simply made a window run without DirectX usage. But now that I've got through to the end of the second tutorial where DirectX is actually initialised, I am having the same linkage errors as before, but this time to do with some of my classes.

I don't really have any experience with windows programming so if anybody has a clue what might be the fix to these errors whether it be in the code or through changing some properties, I'd much appreciate the help. Images found below.
Thanks!
P.S. Apologies for messy code, the insert code tool doesn't seem to be working.

https://gyazo.com/0bc8a03788175beffa1a83656bdf052a
https://gyazo.com/898e22d56ffff3df5f13fe5801d91456
https://gyazo.com/3cc212cb7f7db57ace11fa9e5e76326d
https://gyazo.com/d213dc4631330d321faaa14fe3da7c94
https://gyazo.com/8b5d0aeda463f91ef209df3a22f232e9
https://gyazo.com/8689bd206c46a7275afe06ccec760025
https://gyazo.com/23a9013f830bc128156b0d796c03d380
https://gyazo.com/ee6f861cefef56a435f9fa3c266633cd
https://gyazo.com/779479a37fd0d238b6acd6c5128139fb
https://gyazo.com/ad93bac1f85a7746b72f58b5ead8ab2d
Did you install the dx11 toolkit? it should be pretty hefty, like 500~ ish mega bytes.

Also when you have errors like these, you should probably start off with a hello world style minimal example, and then try to look at other sources to teach you how to set up a library, like msdn, or some sort of tutorial on the internet.
I only looked closely at the first picture. I can't be bothered to decipher your whole program from screenshots.

It looks like you've got missing symbols. This happens when you declare and attempt to use a symbol that the linker doesn't have a definition for.

This missing symbol comes from a library. When this happens, it's usually because
a.) the library that contains the definition was not passed to the linker; or
b.) the library that contains the definition was not passed to the linker in the right order
The library in question here is probably D3D11.lib, but I don't remember DirectX well enough to say for sure.

What does your link line look like?
Last edited on
I know it is something to do with the library, but not sure what. Below are screenshots of my linker properties where I had to change it to "Windows" to fix the same bug before, and the second screenshot shows my Directory includes which I believe to be the correct ones. I made sure to download the DirectX sdk.
https://gyazo.com/9a9b10e747b9a22752d81b2707d665d0
https://gyazo.com/95583d9e114d4cc8add8531d5caa4dc4
edit: I edited out my post before I noticed you replied, I said that directx11 came out at 2010 on google, but it turns out june 2010 is perfectly valid.

never mind what I said, it seems that you have x86 in your image and you have 64 bits in some other options, it is 100% a bit problem.
Last edited on
I believe so. It is the Windows 10 SDK, found here
https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk

This whole thing is really annoying as I just want to be able to move onto and understand the DirectX stuff but these bugs are making it impossible :(
I have tried running it in x86 bit mode too, that just produces a different error as seen below. The reason it is in x64 is because that is what the tutorial I am following said to use, but they didn't show what needs to be changed in the properties.

https://gyazo.com/f9dbe8de6e5aa80dfd9b35c6a857d915
You are getting now compiler errors, not linker errors.
Have a look what parameters are expected:
https://msdn.microsoft.com/en-us/library/s7wzt4be.aspx
Did you use
1
2
3
4
#pragma comment( lib, "d3d11.lib" )
#pragma comment( lib, "d3dx11.lib" )
#pragma comment( lib, "d3dcompiler.lib" )
// ... 


Did you set the library and include directories to the DirectX SDK path?

By the way, I would not recommend you to learn from such an outdated and nasty code, I have learned the D3D API from 2 books "Introduction to 3D game programming with direct3d 11" witch is the standard book for direct3d 11. "Practical rendering and computation with Direct3D" is a very good resource to learn from, it covers the entire API and the book is well organised, good luck.
Last edited on
Topic archived. No new replies allowed.