Converting Directx 11 project to work on Windows 8.1 Directx 11.2 - directx

I'm trying to run a sample project supplied by Frank Luna (Introduction to 3D Game Programming with DirectX 11.0).
http://www.d3dcoder.net/d3d11.htm
I'm using Windows 8.1 with the Windows 8 SDK installed - on Visual Studio 2012 (As I read that Windows 8.1 SDK includes direct x 11.2).
Whenever I try to run the project however I get the following build errors:
Error 1 error C1083: Cannot open include file: 'd3dUtil.h': No such file or directory c:\users\ryan willis\desktop\dvd\code\chapter 14 building a first person camera\camera\vertex.h 10 1 Camera
Error 2 error C1083: Cannot open include file: 'd3dUtil.h': No such file or directory c:\users\ryan willis\desktop\dvd\code\chapter 14 building a first person camera\camera\renderstates.h 10 1 Camera
Error 3 error C1083: Cannot open include file: 'd3dUtil.h': No such file or directory c:\users\ryan willis\desktop\dvd\code\chapter 14 building a first person camera\camera\effects.h 11 1 Camera
Error 4 error C1083: Cannot open include file: 'd3dApp.h': No such file or directory c:\users\ryan willis\desktop\dvd\code\chapter 14 building a first person camera\camera\camerademo.cpp 13 1 Camera
Error 5 error C1083: Cannot open include file: 'xnamath.h': No such file or directory c:\users\ryan willis\desktop\dvd\code\common\waves.h 13 1 Camera
Error 6 error C1083: Cannot open include file: 'xnamath.h': No such file or directory c:\users\ryan willis\desktop\dvd\code\common\mathhelper.h 11 1 Camera
Error 7 error C1083: Cannot open include file: 'xnamath.h': No such file or directory c:\users\ryan willis\desktop\dvd\code\common\lighthelper.h 11 1 Camera
Error 8 error C1083: Cannot open include file: 'd3dx11.h': No such file or directory c:\users\ryan willis\desktop\dvd\code\common\d3dutil.h 13 1 Camera
Error 9 error C1083: Cannot open include file: 'd3dx11.h': No such file or directory c:\users\ryan willis\desktop\dvd\code\common\d3dutil.h 13 1 Camera
Error 10 error C1083: Cannot open include file: 'd3dx11.h': No such file or directory c:\users\ryan willis\desktop\dvd\code\common\d3dutil.h 13 1 Camera
Error 11 error C1083: Cannot open include file: 'd3dx11.h': No such file or directory c:\users\ryan willis\desktop\dvd\code\common\d3dutil.h 13 1 Camera
After more research it seems that Direct 11.1 onwards changed a lot of things and e.g. "d3dUtil.h" is depreciated.
http://blogs.msdn.com/b/jgalasyn/archive/2013/08/06/notes-on-porting-to-directx-11-1-from-earlier-versions.aspx
Are there any equivilants to 'd3dUtil.h' - I cant find any.
How can I get this project to run?
Thanks,

DirectX never has the d3dUtil.h file, it seems that's a helper class made by Frank Luna, you should double check whether you have include that file in your project.

I would suggest HIGHLY to check out Frank's site
http://www.d3dcoder.net/
Mainly his blog post here: http://d3dcoder.net/WordPress/
It covers installing the June 2010 SDK which will give you access to the depreciated DX11 headers.
There are many issues running it on 8.1 and he solves them all there.
I have the same book, followed his setup guide for Windows 8 and it works fine.

XNA and the D3DX libraries were removed in Windows 8, a lot of projects fail to compile on Windows 8 including the original DirectX 11 SDK sample projects.

Related

OpenCV build error while compiling with IE (Inference Engine)

OpenCV Version: 4.4.0 (latest)
OpenVINO Version: 2020.4 (latest)
The error happens when trying to build the project which is generated by CMake 3.18.0 on Windows 10.
I have tried many times building from scratch (clear all caches, update the source code, reinstall the OpenVINO toolkit, and run it's all demos successfully), but the problem still exists.
Here is the VS 2019 build error logs:
46>Done building project "opencv_dnn.vcxproj" -- FAILED.
73>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_dnn440.lib'
75>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_dnn440.lib'
73>Done building project "opencv_text.vcxproj" -- FAILED.
81>------ Build started: Project: opencv_datasets, Configuration: Release x64 ------
82>------ Build started: Project: opencv_videostab, Configuration: Release x64 ------
75>Done building project "opencv_mcc.vcxproj" -- FAILED.
81>Done building project "opencv_datasets.vcxproj" -- FAILED.
88>Done building project "opencv_dnn_objdetect.vcxproj" -- FAILED.
87>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_datasets440.lib'
87>Done building project "opencv_tracking.vcxproj" -- FAILED.
94>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_tracking440.lib'
94>Done building project "opencv_stereo.vcxproj" -- FAILED.
95>cv2.cpp
95>D:\GitHub\opencv\opencv_contrib\modules\saliency\include\opencv2/saliency/saliencySpecializedClasses.hpp(1,1): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
95>D:\GitHub\opencv\opencv_contrib\modules\datasets\include\opencv2/datasets/dataset.hpp(1,1): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss
93>LINK : fatal error LNK1181: cannot open input file '..\..\..\lib\Release\opencv_tracking440.lib'
93>Done building project "opencv_java.vcxproj" -- FAILED.
95>LINK : fatal error LNK1181: cannot open input file '..\..\lib\Release\opencv_dnn_superres440.lib'
95>Done building project "opencv_python3.vcxproj" -- FAILED.
96>------ Build started: Project: ALL_BUILD, Configuration: Release x64 ------
96>Building Custom Rule D:/GitHub/opencv/opencv/CMakeLists.txt
At the end 10 failed:
========== Build: 86 succeeded, 10 failed, 0 up-to-date, 0 skipped ==========
NOTE: Before I was able to build the OpenCV with IE without any errors but in the new release there are many errors while compiling and building.
Any solution..?
I am ready to provide more logs and info if needed.
Thanks!!
The problem was solved by configuring CMake with ngraph flag and locating its CMake files DIR location.

Error 13 error C1083: Cannot open include file: 'cudnn.h': No such file or directory ...\caffe\util\cudnn.hpp 5 1 convert_imageset

When I compile caffe for windows (64bit, release, vs 2013, nvidia 750, opencv 3.1,cuDNN version 5.1), I got the following error
"Error 13 error C1083: Cannot open include file: 'cudnn.h': No such
file or directory ...\caffe\util\cudnn.hpp 5 1 convert_imageset".
I set everything like what mentioned in this video.
I search for this error in github issues link this and this
if I use version 4 of cuDNN and OpenCV 2.4I got:
========== Rebuild All: 15 succeeded, 1 failed, 0 skipped ==========
However, I got error:
Error 1 error MSB3073: The command
""...\caffe-master\windows\scripts\BinplaceCudaDependencies‌​.cmd"
"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\bin"
"...\cuda" false true "...\caffe-master\windows..\Build\x64\Release\"
:VCEnd" exited with code 1. C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.ta‌​rgets
132 5 libcaffe
Extract the cuDNN archive to a directory of your choice, referred to below as installpath. Then follow the platform-specific instructions as follows:
Add installpath to the PATH environment variable.
In your Visual Studio project properties, add installpath to the Include Directories and Library Directories lists and add cudnn.lib to Linker->Input->Additional Dependencies.

Opencv 2.4.11 Windows 8 Visual studio 2012 professional The application was unable to start correctly (0xc00007b)

I just follow the tutorial on
http://docs.opencv.org/doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.html#windows-visual-studio-how-to
and set the project property --> C/c++ directory to C:\opencv\build\include
and linker--> additonal library directory to C:\opencv\build\x64\vc12\lib
linker --> input :
opencv_calib3d2411d.lib opencv_contrib2411d.lib opencv_core2411d.lib opencv_features2d2411d.lib opencv_flann2411d.lib opencv_gpu2411d.lib opencv_highgui2411d.lib opencv_imgproc2411d.lib opencv_legacy2411d.lib opencv_ml2411d.lib opencv_nonfree2411d.lib opencv_objdetect2411d.lib opencv_ocl2411d.lib opencv_photo2411d.lib opencv_stitching2411d.lib opencv_superres2411d.lib opencv_ts2411d.lib opencv_video2411d.lib opencv_videostab2411d.lib
and use the test code here
http://docs.opencv.org/_downloads/introduction_windows_vs.cpp
it built successully but when i run it just say: The application was unable to start correctly (0xc00007b)

Cocos2d-x compilation error

I just downloaded the Cocos2d-x SDK and tried to compile the hello world example with the following result:
<code>The Selected NDK toolchain version was 4.8 !
Android NDK: WARNING: Ignoring unknown import directory: /home/sytrox/Downloads/cocos2d-x/template/multi-platform-cpp/proj.android/../cocos2d
Android NDK: WARNING: Ignoring unknown import directory: /home/sytrox/Downloads/cocos2d-x/template/multi-platform-cpp/proj.android/../cocos2d/external
Android NDK: WARNING: Ignoring unknown import directory: /home/sytrox/Downloads/cocos2d-x/template/multi-platform-cpp/proj.android/../cocos2d/cocos
Android NDK: jni/Android.mk: Cannot find module with tag '2d' in import path
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?
Android NDK: The following directories were searched:
Android NDK:
make: Entering directory `/home/sytrox/Downloads/cocos2d-x/template/multi-platform-cpp/proj.android'
jni/Android.mk:22: *** Android NDK: Aborting. . Stop.
make: Leaving directory `/home/sytrox/Downloads/cocos2d-x/template/multi-platform-cpp/proj.android'
Traceback (most recent call last):
File "./build_native.py", line 166, in <module>
build(opts.ndk_build_param,opts.android_platform,opts.build_mode)
File "./build_native.py", line 153, in build
do_build(cocos_root, ndk_root, app_android_root,ndk_build_param,sdk_root,android_platform,build_mode)
File "./build_native.py", line 89, in do_build
raise Exception("Build dynamic library for project [ " + app_android_root + " ] fails!")
Exception: Build dynamic library for project [ /home/sytrox/Downloads/cocos2d-x/template/multi-platform-cpp/proj.android ] fails!</code>
Which cocos2d-x version are you using? Seems like you didn't define your env variables correctly. Please have a look at this tutorial and make sure you define the following variables:
COCOS2DX_ROOT : should point to the root directory of cocos2d-x
ANDROID_SDK_ROOT : Should point to the root directory of the Android SDK
NDK_ROOT : Should point the to root directory of the Android NDK
NDK_TOOLCHAIN_VERSION : Which Android NDK toolchain should be used
See the problem is that the system is not able to compile the cocos.py.
So, if you open cocos.py from the bin directory where you have unzipped the file
it runs smoothly.
The thing is Python3.x is not able to compile the Phython2.x code.
So we must change the path in environment variable so the system doesn't a python2 file with the help of python3 compiler.
Thanks
Summary
1.Go to Control Panel, then type path or environment in search bar
2.open Evnvironment variables
3.Just delete any C:\Python34 or anything starts with python3.x and add C:\Python27 path where you have installed.
Video link:
https://youtu.be/T8zk3sv0cL0

Phonegap doesn't copy plugin files to ios platforms directory during build

rm -rf plugins/*
rm -rf platforms/*
phonegap build ios //this works
phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git
phonegap build ios
Building for ios after adding a plugin fails. Here is the error:
** BUILD FAILED **
The following build commands failed:
CompileC build/PondMD.build/Debug-iphoneos/PondMD.build/Objects-normal/armv7/CDVDevice.o PondMD/Plugins/org.apache.cordova.device/CDVDevice.m normal armv7 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
2014-01-16 10:32:15.055 xcodebuild[69605:1007] [MT] PluginLoading: Required plug-in compatibility UUID 37B30044-3B14-46BA-ABAA-F01000C27B63 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XCode4_beginning_of_line.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2014-01-16 10:32:16.630 xcodebuild[69605:4203] DVTAssertions: Warning in /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-3575/Xcode3Sources/XcodeIDE/Frameworks/DevToolsBase/pbxcore/SpecificationTypes/XCGccMakefileDependencies.m:78
Details: Failed to load dependencies output contents from ``/Users/william/working/PhonegapPondMD/platforms/ios/build/PondMD.build/Debug-iphonesimulator/PondMD.build/Objects-normal/i386/CDVDevice.d''. Error: Error Domain=NSCocoaErrorDomain Code=260 "The file “CDVDevice.d” couldn’t be opened because there is no such file." UserInfo=0x7fe7a57a7440 {NSFilePath=/Users/william/working/PhonegapPondMD/platforms/ios/build/PondMD.build/Debug-iphonesimulator/PondMD.build/Objects-normal/i386/CDVDevice.d, NSUnderlyingError=0x7fe7a57aaed0 "The operation couldn’t be completed. No such file or directory"}. User info: {
NSFilePath = "/Users/william/working/PhonegapPondMD/platforms/ios/build/PondMD.build/Debug-iphonesimulator/PondMD.build/Objects-normal/i386/CDVDevice.d";
NSUnderlyingError = "Error Domain=NSPOSIXErrorDomain Code=2 \"The operation couldn\U2019t be completed. No such file or directory\"";
}.
Function: void XCGccMakefileDependenciesParsePathsFromRuleFile(NSString *__strong, F) [F = <lambda at /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-3575/Xcode3Sources/XcodeIDE/Frameworks/DevToolsBase/pbxcore/SpecificationTypes/XCGccMakefileDependencies.m:168:73>]
Thread: <NSThread: 0x7fe7a57ab420>{name = (null), num = 7}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
The issue seems to be that phonegap is not copying the objective-c classes and headers into /platforms/ios/
william-macbook-pro:PhonegapPondMD william$ ls -l plugins/
total 8
-rw-r--r-- 1 william staff 296 Jan 16 10:32 ios.json
drwxr-xr-x 11 william staff 374 Jan 16 10:30 org.apache.cordova.device
william-macbook-pro:PhonegapPondMD william$ ls -l platforms/ios/PondMD/Plugins/
total 8
-rw-r--r-- 1 william staff 890 Jan 16 10:30 README
william-macbook-pro:PhonegapPondMD william$ phonegap -v
3.3.0-0.18.0
I had the same problem, and I solved It creating the project with uppercase in the first letter of project name. Yes, it seems incredible, but this was the solution.
I ran into the same issue and solved it by using the instructions here: Cordova 3.2 ios add plugin "Which config.xml? Where is it?"
To summarize, I did the following steps:
1. Removed ios platform via: cordova platform remove ios
2. Re-installed the plugin
3. (Re-)Added the ios platform via: cordova platform add ios
4. Built the project again
After this, it built just fine.
When I added the plugin using cordova plugin add command, it puts the plugin code inside a plugins folder.
When you inspect the plugin folder inside the ios platform, you would see the plugin is not available.
So I created a folder with the same name as the plugin name and copied the files from the plugin src/ directory into this. After this the project built correctly.
I also found it useful to open the native project in xcode to inspect the project closer.
I went with the solution to copy the plugin files from ./plugins/.. to the ios platform plugin directory. Whoever needs it, here is a little helper for gulp.
(npm install gulp gulp-rename)
(gulpfile.js)
var gulp = require("gulp");
var rename = require("gulp-rename");
gulp.task("cp-plugins-ios", function(){
gulp.src(["./plugins/*/src/ios/*"],{base: 'ios'}).pipe(rename(function(path){
var myDir = path.dirname.replace("src/ios","");
path.dirname = myDir;
})).pipe(gulp.dest("./platforms/ios/projectName/Plugins/"));
});

Resources