c1083 cannot open included file 'dxsdk-d3dx/d3dx11.h' - visual-c++

#include <dxsdk-d3dx/D3DX11.h>
#include <d3d11.h>
#include <d3d11.h>
#include <d3dx11.h>
I've already added c++ vcc+ clinker directories, including some library directories, but it's still not working...

Related

unresolved external symbol _IID_IDXGIAdapter4

It is really weird....
I think this symbol _IID_IDXGIAdapter4 in dxguid.lib, but when I use DUMPBIN command to check the symbols inside the dll. There are _IID_IDXGIAdapter1~3, no _IID_IDXGIAdapter4.
Windows SDK : 10.0.18362.0
And most weird is I found a DX12 tutorial that using IDXGIAdapter4 and I can compile it successfully, but my project can't, even I copy his project setting.
https://github.com/jpvanoosten/LearningDirectX12/blob/v0.0.1/Tutorial1/src/main.cpp
In this project, he only use d3d12.lib ,dxgi.lib ,dxguid.lib, and I already put them into project setting.
This was an oversight and is fixed in the next Windows 10 SDK after the current one (i.e. 19041 still has the bug).
DXGUID.LIB was missing:
IID_IDXGIAdapter4
IID_IDXGIOutput6
IID_IDXGIFactory6
IID_IDXGIFactory7
It was reported on GitHub as well.
There's nothing special about dxguid.lib. It's just code like this:
#define INITGUID
#include <Windows.h>
#include <d3dcommon.h>
#include <dxgi1_5.h>
#include <dxgidebug.h>
#include <d3d11_4.h>
#include <d3d11shader.h>
#include <d3d11sdklayers.h>
#include <d3dcompiler.h>
#include <d3d12.h>
#include <d3d12video.h>
#include <d3d12shader.h>
#include <d3d12sdklayers.h>
The bug was using dxgi1_5.h in the dxguid library source, but I updated it to use dxgi1_6.h.
Note that most of the "COM" GUIDs such as for Windows Imaging Component (WIC) are in uuid.lib.
UPDATE: This bug in dxguid.lib is fixed in Windows 10 SDK (20348), version 2104.
pDxgiAdapter1->QueryInterface(IID_IDXGIAdapter4, (LPVOID *)p_ppDxgiAdapter4);
change to
pDxgiAdapter1->QueryInterface(__uuidof(IDXGIAdapter4), (LPVOID *)p_ppDxgiAdapter4);
solve my problem
but in dxgi1_6.h
DEFINE_GUID(IID_IDXGIAdapter4,0x3c8d99d1,0x4fbf,0x4181,0xa8,0x2c,0xaf,0x66,0xbf,0x7b,0xd2,0x4e);
I still can't use IID_IDXGIAdapter4.

'[WXWIN root]/lib/vc_lib/mswd/wx/setup.h': No such file or directory

I have installed WxWidgets 3.1.1, added the WXWIN environment variables, and used Build All with the wx_vc15.sln file. While trying to compile the following code:
#include <iostream>
#include <cstdlib>
#include <array>
#include <iomanip>
#include <ctime>
#include <wx/wx.h>
using std::cin;
using std::cout;
using std::endl;
int main()
{
}
I am hit with this error:
Error C1083 Cannot open include file: '../../../lib/vc_lib/mswd/wx/setup.h': No such file or directory
I go into [WXWIN root]\lib\vc_lib, there are only mswu and mswud there. How come the error complains about something inside mswd which doesnt exist? Could someone please help me? Thank you.
You need to define UNICODE and/or _UNICODE in your project settings (which is normally the default for the new projects).
This is mentioned in the instructions for setting up your project.

ImageMagick in VS2012 - 'identifier not found'

I'm trying to use ImageMagick Library for a C Project in VS2012. I installed the Library from here: klick
Then in my Project, I added D:\Program Files (x86)\ImageMagick-6.9.1-Q16\include\ to the include folders.
Then I tried to use Magick with an example code from here:
[http://www.graphicsmagick.org/1.2/www/api.html]
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <sys/types.h>
#include <magick/api.h>
int main(int argc,char **argv)
{
InitializeMagick(*argv);
GetExceptionInfo(&exception);
... ...
}
Then VS2012 returns errors when I try to compile:
error C3861: “InitializeMagick”: identifier not found
error C3861: “GetExceptionInfo”: identifier not found
error C3861: “DestroyMagick”: identifier not found
Is there any steps I missed?
Thanks very much for your help!
You need to add the .lib files to the linker.
Like setting the header include, open Properties -> Linker -> Additional Library Directories, and add path to .lib files. Then add CORE_RL_magick_.lib & CORE_RL_wand_.lib files to be linked against.
An even easier approach.
Just drag and drop said .lib's from explore into the Solution Explorer.

Linker error using FFMPEG with Visual Studio 2013 Express

I am trying to write a program using FFMPEG libraries. I read about in this link. I downloaded Shared and Devs files from http://ffmpeg.zeranoe.com/builds/.
I created a console project and this is the configuration:
Additional Libraries Directories
Additional Include Directories
And here is my code:
#include "stdafx.h"
#pragma comment (lib, "avformat.lib")
#pragma comment (lib, "avcodec.lib")
#pragma comment (lib, "avutil.lib")
extern "C"
{
#ifndef __STDC_CONSTANT_MACROS
#define __STDC_CONSTANT_MACROS
#endif
#include <libavcodec\avcodec.h>
#include <libavformat\avformat.h>
#include <libswscale\swscale.h>
#include <libavutil\avutil.h>
}
int _tmain(int argc, _TCHAR* argv[])
{
av_register_all();
return 0;
}
And the error I am getting is this:
Error 1 error LNK2019: unresolved external symbol _av_register_all
referenced in function _wmain C:\Users\Andres\Documents\Visual Studio
2013\Projects\PruebaFFMPEG\PruebaFFMPEG\PruebaFFMPEG.obj PruebaFFMPEG
Error 2 error LNK1120: 1 unresolved
externals C:\Users\Andres\Documents\Visual Studio
2013\Projects\PruebaFFMPEG\Debug\PruebaFFMPEG.exe PruebaFFMPEG
What am I missing?
It seems that you are trying to link a 32-bit application with 64-bit libraries. Download 32-bit libraries from http://ffmpeg.zeranoe.com/builds/ or create x64 configuration for your solution.

VS 10 includes, and I have a linker error

I am using Visual Studio 10 to program in C++
The 1st part of my program is
//Includes
//#include <LEDA\numbers> //fatal error C1083: Cannot open include file: 'LEDA\numbers': No such file or directory
#include <LEDA/numbers/real.h>
//Why do I get a linker error here
//All.obj : error LNK2001: unresolved external symbol "class leda::memory_manager leda::std_memory_mgr" (?std_memory_mgr#leda##3Vmemory_manager#1#A)
#include <LEDA\numbers\integer.h> //Here I used the system to write most of it for me
#include <LEDA/numbers/integer.h> //Include LEDA. So 2 things
//1. including the same file twice does not matter
//2. forward slashes and backward slashes are the same
//I tried to use a wild card and said #include <LEDA/numbers/*>
//But that did not work
#include <LEDA/numbers/rational.h>
#include <LEDA/core/string.h>
#include <LEDA/core/array.h>
#include <LEDA/numbers/bigfloat.h>
//The sqrt does not work
#include <iostream> //include ordinary C++
#include <math.h>
and I have a LINKER error
I have tried specifying which libraries to use by specifying the LIB User Environment symbol
I have tried specifying which libraries to use by specifying the
Include Directories and
Library Directories
in the properties of my Project
I have made a mistake somewhere, BUT where is it
There are several mistakes in this program:
LEDA\numbers is apparently a directory, not an include file. So you shouldn't try to include it.
(conceptual) #include statements don't help in resolving linker errors at all. Instead, you need to specify the libraries you want to link with to the linker; libraries are files that end in .lib. Go to the project settings, and add the libraries containing the missing symbols.
#include <abcd.h> // looks for the include abcd.h in the INCLUDES path.
#include "abcd.h" // looks for the include abcd.h in the current path and then INCLUDES path.
From your description it looks like your LEDA lib in under your current directory. Try using "" instead of <> and see if it fixes your errors.

Resources