Skip to main content
GameDev.net gamedev.net
🔒 Locked

D3DReflect unrsolved external symbol

Started by osiris_dev Feb 19, 2018 at 10:15 AM 3 replies 6.4k views
Original Post
osiris_dev
osiris_dev

Hello!

Have a problem with reflection shader for D3D11:

1>engine_render_d3d11_system.obj : error LNK2001: unresolved external symbol IID_ID3D11ShaderReflection

I tried to add this:

#include

#include

#include

#pragma comment(lib, "D3DCompiler.lib")

//#pragma comment(lib, "D3DCompiler_47.lib")

As MSDN tells me but still no fortune. I think lot of people did that already, what I missing?

I also find this article http://mattfife.com/?p=470

where recommend to use SDK headers and libs before Wind SDK, but I am not using DirectX SDK for this project at all, should I?

GuyWithBeard
GuyWithBeard

You also need to link against dxguid.lib. Try adding


#pragma comment(lib, "dxguid.lib")

to your code. I don't know why the docs don't mention this.

osiris_dev
osiris_dev

Thank you, guys! It helped.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.