Codeblocks says "the path you entered seems valid, but this wizard can't locate the following SDL's include file: SDL/SDL.h?" - sdl

I'm going through the normal process of naming the program, choosing the directory to install it in, but then it asks me for the location of SDL's include and lib library. I am currently storing my installation of SDL at C: directory but when I type in C:\SDL2-2.0.5\i686-w64-mingw32 as it asks me for the path to the lib and include files, I get the error. How can I stop CodeBlocks from returning the error?
SPECIFICS:
SDL2.5
Error: the path you entered seems valid, but this wizard can't locate the following SDL's include file: SDL/SDL.h?

See if changing the include path to C:\SDL2-2.0.5\i686-w64-mingw32\include works. Most libraries include the header files in the /include directory and the libraries in the /lib directory.
Also, I believe the windows version of the binaries have the additional "SDL2/" before the headers whereas the mingw version, that you're using, does not (I can't remember off the top of my head).

Related

Boost/Array.hpp: No such file or directory (On Visual Studio 2019)

I have included the boost library by going to properties, and then adding the path in the VC++ include directory, and the C/C++ Additional Include Libraries.
I have added the header files using #include<boost/array.hpp> and #include<boost/static_assert.hpp>.
While building, I get warnings regarding the other Boost header files, such as clang.hpp, however, the error message displayed is boost/array.hpp: No such file or directory. Since the warning messages are generated for the other Boost header files, I am assuming that the path has been registered and the Boost files are located by Visual Studio (I am quite possibly wrong about this). What am I doing wrong?
EDIT: I was building a Linux Console Application, and found out my mistake. Have added the answer below.
So I was trying to build on a linux machine remotely (Crucial detail that I had missed out earlier), so I had to insert the path in the format -I "path", to the boost library on the linux machine. I made the mistake of downloading the boost files on the windows machine, and adding the path to the windows boost files instead.
Go to Properties, C/C++, Command Line (Additional Options), and then enter the path over there to the library on the linux machine.
For example: -I /usr/FileSystem/boost_1_72_0

How do I install Boost.signals2 into my project?

I'm having trouble succesfully including Boost.signals2 in my project so i can have an event-like system for button presses with my OpenGL window.
I downloaded boost.signals2 from its github page and took the contents of the Include folder, and put it into my own Include folder that i have included in my project (this is so i can just add stuff i need as i go and have something i can share across projects).
Problem is, when i build my project after including Boost.signals2, and having the line #Include <boost/signals2/signal.hpp> i am presented with a bunch of errors from all the Boost.signals2 headers, all of which are cannot open source file "boost/config.hpp": No such file or directory or some other boost/{x}.hpp. I'm at a total loss as to where i'm going wrong. As far as i understand, i do not have to build the Boost.signals2 library as it is header only, but maybe i am wrong?
How can install Boost.signals2?
You have to add the include path for the complete boost libraries to your compile flags.
If you extracted the tarball in directory XYZ, the include path would just be that (so -I XYZ or -isystem XYZ).
Signals2 in particular is header only, so it doesn't need to be built and/or linked.

Cannot find -Ifreeglut

I am working on Glut Project in Code::Blocks. I have Freeglut.dll in windows folder in C Drive. I have also copied this file in sysWOW64 (as i am using windows 10). But it still gives the error mentioned in the pictures bellow:
The linker does not find Freeglut.lib. Most probably you missed to add the path to the lib directory to the linker options. I don't know how to do this in Code::Blocks, but in general you have to add these additional library directories using the -L<DIR> switch for the linker.

VS2012: Program can't start because "libvorbisfile.dll" is missing

I've got a project and I'm trying to make it read a .OGG file.
I've downloaded the libogg and libvorbis from here, compiled them (had some trouble figuring I had to build libogg first), then got the following files:
libogg.lib
libogg.dll
libvorbis.lib
libvorbis.dll
libvorbisfile.lib
libvorbisfile.dll
I dragged all of them in my project's Libraries folder, already added to the project, and included them in the Linker->Input (only the .lib).
Next I copied the headers to my project's Includes folder, also already added to the project, with the files:
ogg/ogg.h
ogg/os_types.h
vorbis/codec.h
vorbis/vorbisenc.h
vorbis/vorbisfile.h
Then I added some code, and I get the error "The program can't start because libvorbisfile.dll is missing from the computer."
And I'm pretty sure the file IS in the Library folder and properly defined in the properties.
Did I do something wrong along the way?
How can I figure what is wrong so I can fix it?
I already tried putting the .dll in the project's folder and in the Windows/System32 folder as well, didn't work.
The library folder is fine for your .lib files, but it's looking for the .dll at run time, which your project settings have no effect on. Windows looks in a few places for a .dll, but the easiest way to get your program to run is to put the .dlls in your working directory, which is where ever you run your executable from (probably the same directory as the .exe file).

"Include can't be found", how to fix it?

I am developing using OpenSceneGraph. I installed it from a user-runnable installer.
When I try to compile an application using OpenSceneGraph, I have this error :
Lexical or preprocessor error : Include cannot be found for all <osg/*> includes like <osg/AnimationPath>.
The file is available here /Library/Frameworks/osg.framework/Versions/92/Headers/XXXX So following this solution on how to "add existing frameworks" to the new Xcode, I added osg.framework to the project.
any idea is a welcome.
I am using :
IDE Xcode 4.5
Clang 4.1
OS X Mountain Lion
When compiling you will have to add the include files using the -I option of the compiler and also possibly add library directory using the -L option of the compiler(the options may be a bit different if you are using compiler different from gcc).
I guess both library and the include directories for this product should be subdirectories of the install destination you have chosen. For the include directory of course look for directories containing some kind of header files .h or .hpp and for the libraries look for .lib or .dll doesn't the library documentation mention what includes and libraries you need and where you can find them?
EDIT: you will also have to tell xcode where to search for your includes. I tried googling it and here is one of many results on how to add a directory to the include path of a project.
You will have to located which directory to add to the include path. It seems they set some environment variables in the official documentation for that.
Hope this helps.
You'll need to add /Library/Frameworks to the "Frameworks search path" in the project settings.