fatal error: dxgi.h: No such file or directory. Building SDL 2 with biicode
SDl2 since 2.0.2 do not support mingw32. There is no any advantage of using MinGW32 instead mingw-w64. So probably the best way to solve the sdl2 compilation issue is to upgrade mingw.
At biicode you'll find older versions of sdl2 (2.0.1) that do not make use of dxgi directly.
The Mingw64 works on Windows 32 as in 64
proplem with sdl setup windows
I actually just set up SDL2 on Code::Blocks myself a day or two ago. Since I suspect your environment might not be configured correctly, here's how I did it, roughly following the tutorial here:
- Download both a runtime binary and a development library from the SDL2 download page. Make sure the runtime binary is appropriate for your apps - in other words, if you're building 32-bit executables, get the 32-bit SDL, and if you're building 64-bit binaries, get the 64-bit SDL.
- Unpack the development library into a folder of your choice, and do the same with the runtime binary. Remember what paths you used for these. I used "D:\Programming\C++\SDL\SDL2.dll" for my SDL runtime binary and "D:\Programming\C++\SDL\SDL2-2.0.3" for my development library.
- Open your project in Code::Blocks.
- Go to the Settings menu and click "Compiler..."
- Switch to the "Search Directories" tab, then the "Compiler" subtab.
- Click "Add" and browse to the folder for your development library. You'll need to pick whether you're developing for 32-bit apps or 64-bit apps here: if you're going for 32-bit, you'll want to add "\i686-w64-mingw32\include" ("D:\Programming\C++\SDL\SDL2-2.0.3\i686-w64-mingw32\include") and for 64-bit apps you'll want to add "\x86_64-w64-mingw32\include" ("D:\Programming\C++\SDL\SDL2-2.0.3\x86_64-w64-mingw32\include").
- Go to the "Linker" tab right next to the "Compiler" tab.
- Click "Add" and browse to your the folder for your development library. Once again, based on whether you're going for a 32-bit app or a 64-bit app, add "\i686-w64-mingw32\lib" ("D:\Programming\C++\SDL\SDL2-2.0.3\i686-w64-mingw32\lib") or "\x86_64-w64-mingw32\lib" ("D:\Programming\C++\SDL\SDL2-2.0.3\x86_64-w64-mingw32\lib") respectively.
- Take the SDL runtime binary ("D:\Programming\C++\SDL\SDL2.dll") and copy & paste it into the folder your compiled EXE will end up in. Since you're using Code::Blocks, this will usually be %PROJECT_FOLDER%\Bin\%RELEASEMODE%, where %PROJECT_FOLDER% is the path to your project and %RELEASEMODE% is Debug or Release.
- Build your project and verify that it works.
You can also set this up on a per-project basis rather than a global basis if you want. Just go into the Project menu and click "Build options..." instead of the Settings menu in step 4.
If SDL still doesn't work after this, I'd suggest getting an updated MinGW and making sure Code::Blocks is properly set up to use it.
Errors in Upgrading VC++ project from VS 2010 to VS2012
I have fixed this problem using the hotfix mentioned in the edit (Update 4, VS2012). Additionally, there is some circular dependency problems going on in the application related to OpenCV which has nothing to do with this question, so by using the hotfix I believe I have uncovered a broader issue with openCV header files which I can resolve in a straightforward manner.
No such file or directory error for hashlib++ library in CodeBlocks
Ok, so I figured out what the issue was. By section 3.1,
- Go to your project in the "Management" tab, and right-click the project you are working on. If you cannot see that section go to View > Manager, or press Shift + F2.
- After right-clicking, select "add files..." and simply find and add the .h file you will be using. After it should show up in the "Management" section in a folder called "Headers".
- Type in appropriate
#include
line in your code. I downloaded the entire hashlib2plus folder and put it in my project folder, so mine looked like#include "hashlib2plus/trunk/src/hashlibpp.h"
Hope this resolves any issues in the future!
Related Topics
Assigning a String of Characters to a Char Array
How to Use C Source Files in a C++ Project
Why Can't I Static_Cast Between Char * and Unsigned Char *
Interfaces VS Templates for Dependency Injection in C++
VS 2012 - Project Failed to Build Because of Missing Toolset
Using Zeromq Together with Boost::Asio
Is the Std::Set Iteration Order Always Ascending According to the C++ Specification
Undefined Reference to Static Variable
Template Tricks with Const Char* as a Non-Type Parameter
How to Use a Lambda Expression as a Template Parameter
Conversion from Iplimage* to Cv::Mat
Code Browsing, Refactoring, Auto Completion in Emacs
How Does a C/C++ Compiler Find the Definitions of Prototypes in Header Files
This Declaration Has No Storage Class or Type Specifier in C++
Std Linker Error with Apple Llvm 4.1