I am returning to an old DX9 project and have found a lot of my libraries have since been deprecated, specifically all D3DX files.
I'm trying to import DirectXTex to replace D3DX11Tex.
I've downloaded the library from its github page here
To add it I've added the file path to DirectXTex to additional dependencies but when I include it in my texture header file it's underlined in red.
Can anyone tell me what I'm doing wrong? Is it necessary to include additional dependencies in header files? I haven't open up visual studio in a long time and am a bit rusty.
What version of Visual Studio and the Windows SDK are you using? I have fairly detailed instructions here.
You should take a few moments to read this post as you may find that DirectX Tool Kit is a better fit for your project needs than DirectXTex or vice-versa.
Related
iam actually trying to get opencv running on my Computer. I allready configured the environment variables on Windows and added the Path for the includes and the libraries in a propertiesheet.
Now when i want to add additional dependencies i watched into my directory (opencv\build\x64\vs12\lib)and there are only two files. opencv_world310.lib and opencv_world310d.lib. So they are on my HDD.
I think these are the files i have to add?
I did this and then i got the error LNK1104 could not open "opencv_world310d.lib. Same with opencv_world310.lib.
Iam trying to build a example-code from opencv so there should be everything fine with it. I saw some Tutorials they did not have any issue. But they used OpenCv3.0
Is there any workaround?
kind regards
Yes. By default, opencv_world310.lib is the only file you should link with.
Or if you're building with Debug configuration, you should use opencv_world310d.lib instead.
Since the error code is LNK1104, I believe your additional library path is something wrong.
And then please check you are building x64 code not win32 code.
I have been having this issue with OpenCV 2.4.2 that it doesn't really get installed properly with Microsoft VS 2010 Express; It is always missing a dll file or two doesn't matter what I follow by Googling. Also, Visual Studio 2010 Express is only valid for a few days, so it is acceptable that VS will not behave well with OpenCV at that point. However, when I changed my IDE to CodeBlocks, it is even stranger because now I have missing dll files and also "Missing Entry Point" error because of a duplicate .dll file. I found this guide and followed what it told me to do:
http://conanhung.wordpress.com/2012/05/23/opencv-2-2c-codeblocks-and-mingw-got-it-working-on-windows/
But it still doesn't work!! What I am after is a complete and definitive solution to integrating OpenCV (preferrably 2.4.2 version) on a Windows 7 64-bit machine. I have been turning Stackoverflow inside out but no solution is working for me. The problems are
WHEN USING VISUAL STUDIO:
Missing dll file (e.g. libopencv_core242d.dll, etc.)
WHEN USING CODE BLOCKS:
First it complains that libstdc++-6.dll is missing. When I download it to my C:\MinGW\libexec\gcc\mingw32\4.7.0 folder, it stops complaining about this. But now it complains that there is any entry point problem and some other .dll file is missing!!!
If someone has managed to make it work by hook or crook, I will be more than happy to know what it is, IN DEPTH. I don't believe that such an important library can be so stupidly distributed so that developers have to struggle night and day to make this work.
FYI, I have tried even the OPenCV website and frankly their instructions are a bit useless. Also, all the necessary information e.g. adding PATH, adding includes and libraries, etc. Please someone point me to the right direction as it has been two days and I cannot get anywhere. It is literally stopping my job now :(
As an answer, but probably a very simple one, I did the following and got rid of the problem:
1) Uninstalled code::blocks completely from the PC and downloaded the IDE-only version (i.e. withouth MinGW compiler), then installed it.
2) Downloaded the latest stable version of MinGW, installed, and added C:\MinGW\bin to PATH
3) Followed rest of the instructions from [link] http://conanhung.wordpress.com/2012/05/23/opencv-2-2c-codeblocks-and-mingw-got-it-working-on-windows/
4) Just to be sure, copied the opencv .dll files from the build folder (i.e. the one that you have created "make" and "install" files using CMake) to the debug (i.e. the executables') folder.
This will fix the problems. In case, it doesn't it might be that you need to add some environment variables.
I recently updated to Visual Studio 2012 Ultimate. I was programming previously with DirectX 11 June 2010 SDK and want to continue to do so using Visual Studio 2012. However, I discovered that VS2012 comes with its own DirectX SDK (in Windows Kit 8.0) and I've been trying to migrate my code using the newer versions of d3d11. Everything went fine until I try to use effect files in my project (.fx files). I had to compile the Effects11 Sample in the DirectX SDK using VS2012 and link the lib file in my project. That went fine too. However, when I compile my project the function D3DX11CreateEffectFromMemory returns a E_NOINTERFACE error (no such interface is supported). Can anyone tell me why is that? Note that I'm using the d3d11.lib from the Windows Kit and the d3dx11.lib from the DirectX SDK. Perhaps I shouldn't mix them? However, everything else works fine when I mix them, except for the effect file creation.
Any help would be appreciated.
P.S. I don't know if this is helpful but just so you know, if I add an additional library directory in the project settings of "DirectXSDKInstallPath\lib\x86\" it works. Why is that? Does it mean I'm using the older version of the libraries? This will give a ton of warnings about redefined headers in winerror.h
D3DX Library has been deprecated for the newest version of DirectX 11 (Windows 8). See http://msdn.microsoft.com/en-us/library/windows/desktop/bb172965(v=vs.85).aspx
Effects are now handled a different way. You can program your own library to load effects or use DirectX Tool Kit (DirectXTK): http://directxtk.codeplex.com/
Microsoft has recommended this tool kit on their web site, see http://msdn.microsoft.com/en-us/library/windows/desktop/ee663275.aspx for more information.
Effect11 has moved to https://fx11.codeplex.com/, you need to compile it and link yourself.
DirectXTK does not provide the effect11 interface, but only simplified effects
This is probably caused by d3d library conflicts.
Make sure what d3d libraries you are using.Because there are 2 different d3d libraries.
One in DXSDK_DIR\Lib\x86 or \x64,and one in c:\program files(x86?)\Microsoft SDKs.
If you are using DXSDK, then pass $(DXSDK_DIR)Include $(DXSDK_DIR)Lib\x86 ahead of Microsoft SDKs' includes,libs directory in the Include directories and Library directories fields respectively.
In the previous version of Direct3D, the effects framework worked out of the box once you linked with the D3D10 library. In Direct3D 11, the effects framework has been moved to the D3DX library, and you have to include a separate header file (d3dx11Effect.h) and link with a separate library (D3DX11Effects.libfor release builds and D3DX11EffectsD.libfor debug builds).
Furthermore, in Direct3D 11, they give you the full source code for the effects library code (DirectX SDK\Samples\C++ \Effects11). Thus, you could modify the effects framework for your own needs. In this book, we will only be using the effects framework as is, without modification. In order to use the library, you need to first build the Effects11project in both release and debug mode to generate the D3DX11Effects.lib and D3DX11EffectsD.libfiles; you will only need to do this once unless the effects framework is updated (e.g., a new version of the DirectX SDK may update these files, so you may want to rebuild the .lib files to get the latest version). The d3dx11Effect.h header file can be found in DirectX SDK\Samples\C++\Effects11\Inc.
For our sample projects, we place the d3dx11Effect.h, D3DX11EffectsD.lib, and D3DX11Effects.libfiles in the Commondirectory that all of our projects share code from (see the “Introduction” for a description of the sample project organization).
I've got an .xnb file from a Windows Phone project made on Windows 7. I'd like to use the same asset in a Windows 8 Metro app. I've got MSVS 2012 RC on Windows 8 with a project from the MonoGameWindowsMetroApplication template. I put the .xnb file in the project Assets folder and tried to load it, but I get an exception telling me that the asset can't be loaded. What properties or configuration do I need to be able to use the .xnb file?
While MonoGame is working on the Content Pipeline piece of the framework, you can simply use the same Content Pipeline engine that you used for the Windows Phone 7 game to create a Content Pipeline and use the associated .xnb files in your Windows 8 XNA MonoGame project.
I have a blog tutorial series on building XNA games with MonoGame for Windows 8, and if you look at Part 3, I provide a step-by-stepy walkthrough of accomplishing this. My hands-on lab and information on my blog was reviewed and approved by the MonoGame team.
See info here: http://blogs.msdn.com/b/tarawalker/archive/2013/01/04/windows-8-game-development-using-c-xna-and-monogame-3-0-building-a-shooter-game-walkthrough-part-3-updating-graphics-using-content-pipeline-with-monogame.aspx
The runtime Xna framework has many type reader objects that read the various xnb files. Some of the type readers are for xnb files that were processed from fbx models, others are xnb files processed from 2d image files, etc.
When you call content.Load<T>(xnb file name), The content manager uses the appropriate reader to read the byte information of the xnb file into the appropriate Xna class. The byte information in an xnb file is designed to be used in a specific Xna class, no other. There are no Xna classes in metro.
All this to say there are no type readers in the metro environment that read these xnb files. You would have to write your own. It's not that hard though, that's similar to what I did. I now process an fbx file into xnb by building an Xna project, then my xna project writes the runtime model's data to my own binary file, which I read from my metro app. But I could've simply read the xnb also. I just would have had to study the contentManager's & Model class' type readers to see how the byte info was distributed.
After all is said and done, it just means I don't have to learn the FBXSDK which would be the standard way (and arguably preferred way) of bringing in model info.
EDIT - sorry, didn't clue into the use of the mono framework. I don't know anything about that... Maybe they do have a way of importing xnb files.
Are you on the develop3D branch? I think you need to add a dummy Content project and add it to that project, not your assets, build that project first, then you need to reference that project in your MonoGame project.
I didn't succeed on that yesterday as I'm using the current stable but one of the MonoGame guys told me to do just that yesterday. Here are some instructions:
https://github.com/mono/MonoGame/wiki/MonoGame-Content-Processing
In MonoGame content pipeline is not present, at least as off now.
Its very easy.
1)Create a xna project in VS2010
2)add all your assets over there.
3)Rebuild your project. Go to bin/x86/debug/content and copy all contents from there
Now go to your VS2012 Mono Project bin/x86/debug look for content folder, if its there copy all content there else create a content folder and copy all content there.
Now without changing even single line of code just run your project and you will find everything working great!!!
Let me know if you find any difficulty doing that.
I'm not sure if this is the right place for asking these kind of question but I have no better place in mind.
After LOTS of coding in OpenCV, I'm trying to migrate to new C++ interface of openCV which has been introduced in OpenCV 2.0. but I keep getting strange errors.
For example:
trying to use pre-built dlls and libs, I got exceptions in "cv::warpAffine" and "findContours" cv::function at runtime. I compiled the openCV, used my own build of libs and dlls and everything got fixed!
the same problem happened in linux.
linking the "Debug" built dlls with "Release" built of program cause some unexpected runtime errors, and vice versa.
and some other errors.
can anyone helping me with what I'm doing wrong? (please keep in mind that I coded alot with older version of openCV).
When I migrated to C++ interface I couldnt make openCV work until I compiled the source by myself. Probably DLL's and Libs that are installed with opencv are good only to a specific machine.
Another thing. Try to do the following if you use Visual Studio
go to Project Properties->Click the C/C++ folder->Code Generation->Runtime Library and change it to /MDd in Debug configuration and /MD in release
It solves a problem with esceptions related to STL
Some of the functions ave moved out to new libs (especially some of the stereo functions are in calib3d) and the header file structure is completely changed in 2.2
There are some guides to the configuration eg for visual studio