I'm trying to build a solution that contains dozens of projects, unfortunately I cannot find a way in VS2013 to add a "global" include directory to the solution since I need to include Directx.
Is there really no other way in VS2013 to add directories to a solution besides of adding them manually project by project?
Starting with VS 2010, the correct way to add the DirectX SDK to a project is to use VC++ Directories settings. See this old VC post for details.
You can also use custom .props through Property Manager. This is how you would use the Windows 8.x SDK with VS 2010 for example because the Windows SDK no longer creates Platform Toolsets for this combination of tools. See this post.
Historically the include path order has been the following because the DirectX SDK contained newer headers than the Windows SDK 7.x and prior:
$(DXSDK_DIR)Include;$(IncludePath)
$(DXSDK_DIR)Lib\x86 or x64;$(LibraryPath)
Now that the DirectX SDK is deprecated, the Windows 8.x SDK that comes with VS 2012 and VS 2013 contains newer headers than the legacy DirectX SDK. Therefore, if you still need to make use of old components that are only in the DirectX SDK (such as the deprecated D3DX library), you need to use:
$(IncludePath);$(DXSDK_DIR)Include
$(LibraryPath);$(DXSDK_DIR)Lib\x86 or x64
There are a few more minor details covered on MSDN
For Direct3D 11 development, you should remove use of the DirectX SDK in favor of the Windows 8.x SDK anyhow. See Living without D3DX and DirectXMath.
If using XInput 1.3 and you still need to target Windows 7 or earlier, one option is to use XInput 9.1.0 instead. See XINPUT and Windows 8. This is used by DirectX Tool Kit's GamePad when targeting down-level to avoid the need for the legacy DirectX SDK.
The only cases where it still makes sense to involve the DirectX SDK in newer Win32 desktop apps is when using XAudio2 and shipping on Windows 7 or earlier. See XAudio2 and Windows 8. This is used by DirectX Tool Kit for Audio when targeting down-level.
In both cases of using XInput 1.3 and XAudio 2.7 you actually need to use full paths to the DirectX SDK headers/libs and not rely on project search paths to pick up the right headers since they have name collisions with XInput 1.4 and XAudio 2.8 in the Windows SDK 8.x.
Related
I started playing around the the preview bits of the .NET 3.0 SDK. Now every .NET Core project I compile with VS Code, Visual Studio or the .NET CLI tries to use that preview version of the SDK.
How can I make this an opt in choice on my whole machine, i.e. always use the latest stable version of the SDK (whatever version that might be) and only use the preview SDK when I explicitly say so in the local global.json of the particular project.
Update: Maybe global.json is not the right approach? How could I play with preview SDKs in isolation without them affecting my whole machine?
I just signed up for an Evernote API key and downloaded the Evernote SDK for Windows in Visual Studio 2015 (suing NuGet) only to be told "Evernote.SDK 1.25.0 is not compatible with uap10.0".... so it seems it only supports .Net v4.0 which is very disappointing. I had a great idea for a UWP app that I wanted to synch to Evernote but I guess now I can't do it.
In case you're not aware UWP (Universal Windows Platform) is now the standard for developing current and future Windows 10 apps that run across all W10 devices. Can anyone at Evernote tell me if the SDK will support this and if so when? More people already use Windows 10 than use iOS (on PC's and tablets at least) so I really hope this platform will be supported in the very near future.
From the 1.25 version number you mention, it sounds like you're trying to grab the older C# SDK. You can try the newer SDK for Windows and see if that works.
If that NuGet package also doesn't work in your UWP environment, you should be able to grab the source from Github and put that in your VS solution.
I read this topic but somehow it still doesn't get through my thick skull.
The topic said:
Starting with Windows 8, the DirectX SDK is included as part of the
Windows SDK.
So I try to find in this page a way to setup a directX project. I read:
Using DirectX SDK projects with Visual Studio
...
Ensure that the June 2010 release of the DirectX SDK is installed on your development computer.
I don't understand what's this topic talking about. The first part it said in Windows 8, I don't have to install DirectX SDK (because it is included in Windows SDK), the part about HowTo setup directX project, it said I have to install DirectX SDK.
Anyway, I just ignore and keep going - I don't install DirectX SDK assuming it is already included in Windows SDK as the first quote states.
I do one thing as the topic said:
Include Directories: $(IncludePath);$(DXSDK_DIR)Include
Include Library Directories: $(LibraryPath);$(DXSDK_DIR)Lib\x86
In VS2015 VC++ Directories doesn't have Include Library Directories: so I understand it as Library Directories, the project is for win32 so I don't setup directX SDK for 64. Then I run the project and get the error:
TRK0005 Failed to locate: "CL.exe". The system cannot find the file specified.
So the question is: Do I need to install DirectX SDK if using windows 8 and above or I have to download and install DirectX SDK
Thanks for reading :)
This is covered on MSDN and in more detail in this series of blog posts: Where is the DirectX SDK (2015 Edition)?, The Zombie DirectX SDK, DirectX SDKs of a certain age, and A Brief History of Windows SDKs.
If you are coding a DirectX 11 application, you can use the Windows 8.1 SDK that comes with VS 2015 and don't need the DirectX SDK at all. This application can be written to run on Windows Vista SP2 or later. You don't need the DirectSetup REDIST either as deployment is part of the OS. Do not make use of D3DX11 and use one of the many open source replacements instead. If you are writing a Universal Windows Platform (UWP) app, you can't use the legacy DirectX SDK as those components won't pass WACK.
If you are new to DirectX 11, a good place to start is the Direct3D VS Game Templates and the DirectX Tool Kit for DirectX 11 tutorials.
The one case where you might need the legacy DirectX SDK for your DirectX 11 app is if you want to use XAudio2 on Windows 7. This is covered here. If you require Windows 8 or Windows 10 to run, you can just use XAudio2 that's built into the OS and the Windows SDK.
This requires 'mixing' the Windows 8.1 SDK with the legacy DirectX SDK include paths which is where all the guideance about switching the include/lib path order comes from. For a Windows desktop app, you can still use legacy D3DX if you want with VS 2015--such as when using outdated tutorials or books to learn from--but note that the DXERR library is not compatible with the Visual C++ 2015 REDIST. You can work around this issue per this post.
If you are coding a legacy DirectX 9 application, then you likely want to support Windows XP as well. See here for details on how this works with VS 2015, and this does require the legacy DirectX SDK.
There's nothing in the legacy DirectX SDK for DirectX 12.
For information on other aspects of the moving beyond the legacy DirectX SDK see Living without D3DX, DirectX SDK Tools Catalog, DirectX SDK Samples Catalog, Living without D3DX, Direct3D SDK Debug Layer Tricks, and Not So Direct Setup
If you are looking to use DirectX with C# instead of C++, be sure to read this post.
currently I have to port an existing mobile application which runs on Android and IOS to Windows 8. Unfortunately it is using a lot of C++11 Stuff, which is not supported by Windows Phone 8.0. The project itself was written with cocos2d-x 2.0. It contains a C# Part which loads a C++ library with the major part of the application. Also it includes modules from "Project Angle", which is a library to convert OpenGL calls into DirectX calls.
The first thing I tried was to upgrade the project to Windows Phone 8.1 using the 'reassign project' option from Visual Studio. I still had to remove a bit of C++11 Code, but now at least the project itself compiles. After compiling I got some linker errors for functions like 'getenv'. The angle libraries don't even compile and gives me errors like 'Cant find include file vccorlib.h' for every single source file.
Since I'm completely new to Windows development, I don't know if something went wrong on upgrading the projects, or if I have to fix something within the projects. But I tried to upgrade an other project, which was already ported to WP8, and got the same errors.
Now I have to deceide if I have to fix the Windows Phone 8.1 version or if it's easier to remove C++11 Code for 8.0 (which means a few days of work and let my heart bleed)
I also found a compiler update for Visual Studio 2012, which has extended support for C++11, but it seems it's not compatible for Windows Phone.
I hope someone of you could give me a hint, what I have missed for WP 8.1 or has another idea. Thanks for your help!
Cocos2d-x should work on Windows Phone, but you have to get the right version. You can't use pre-built binaries for other platforms (even desktop Windows) and you need to make sure you're building correctly. See the download page.
Visual Studio 2013 Update 4 is the latest stable release of VS that supports Windows Phone projects; you can see the level of C++11 support listed here along with support in the not-yet-finished Visual Studio 2015 compiler.
My Windows7 has DirectX 11 as default.
But I have trouble with DirectX 11 when I use SDL2.0
The solution is downgrading DirectX 11 to 9.0c (googling result)
Is there any method for downgrading?
I couldn't find DirectX 11 in 'program add/remove'
So I can't remove DirectX 11 in 'program add/remove'
If you use SDL 2.0 library to develop your application, you have three steps to config it.
Include SDL.h at the beginning of you program
Link sdl2.lib and SDL2main.lib in your project settings
Put SDL2.dll in your project directory(or put it in you System32 directory, so every project can
use it)
please take a look at the tutorial on this page for details. although it is for SDL 1.2, you can easily apply it for SDL 2.0.
If you want to build SDL 2.0 source code, you should install the DirectX SDK, since SDL 2.0 has a renderer based on DirectX 9.0
My Windows7 has DirectX 11 as default.
Your Windows7 also have DirectX 9.0 runtime library d3d9.dll, the DirectXruntime libraries was shipped with Windows7 in System32 folder.
I couldn't find DirectX 11 in 'program add/remove'
You can only find it after you install the DirectX SDK
In Windows 7, DirectX is a core component of the operating system and cannot be manually removed. If you are having trouble with specific DirectX 11 hardware, you can try updating the hardware drivers via the vendor's website, or disabling the hardware in Device Manager.