This project has moved and is read-only. For the latest updates, please go here.

unresolved external symbol "long __cdecl DirectX::CreateWICTextureFromFile(struct ID3D11Device *,struct ID3D11DeviceContext *,wchar_t const *,struct ID3D11Resource * *,struct ID3D11ShaderResourceView * *,unsigned int)

Oct 7, 2014 at 4:37 AM
Hi,

I am getting a linker error when trying to call CreateWICTextureFromFile. I am not sure why. I had my project working in vs2012, but when I upgraded my solution to vs2013 I started to get this error.

Does anyone have an idea of what's going on?

Thanks,
Alex
Oct 7, 2014 at 11:59 PM
Edited Oct 8, 2014 at 12:00 AM
What kind of project were you using before you upgraded to VS 2013? Windows Store for Windows 8.0, Win32 desktop, Windows phone 8.0, Xbox One ADK, or Xbox One XDK?

Ideally you should be using project-to-project references and move from using the VS 2012 vcxproj to the VS 2013 vcxproj. See the documentation for details on using References.
Oct 8, 2014 at 1:06 AM
My project is a Win32 desktop project. I actually used Nuget to download the package. I tried manually adding the DirectTK.lib file to my project, but vs still couldn't find the function. I don't think I'm able to use any of the DirectTK though. I'm considering adding the project manually.
Oct 8, 2014 at 1:19 AM
I've succeeded it to work by manually adding DirectXTK
Oct 8, 2014 at 7:01 PM
Edited Oct 9, 2014 at 5:20 PM
The latest NutGet package for DirectXTK is for VS 2013 and should work, but manually adding it work as well.

https://www.nuget.org/packages/directxtk_desktop_2013/2014.7.15.1

Note: static libraries built by one version of VS are not necessarily compatible with the static libraries built by another.
Marked as answer by walbourn on 10/8/2014 at 11:02 AM
Feb 9, 2015 at 8:00 AM
I know this thread is months old but I also had to add some direct X .lib files to the Linker > Additional Dependencies list to make the linker happy and building finally.

The Additional Linker Dependencies are in the Project Property Pages > Configuration Properties (on the right) > Linker > Additional Dependencies.

My final Additional Dependencies list was:
d2d1.lib; d3d11.lib; dxgi.lib; ole32.lib; windowscodecs.lib; dwrite.lib;runtimeobject.lib;%(AdditionalDependencies)