I'm trying to install ODEINT on codeblocks to try to write a program that solves ODEs. I've never used external libraries before so I have no idea on how to get started.
After spending a while searching online and watching videos on youtube, here's what I've tried to do:
I downloaded the Odeint zip file from http://headmyshoulder.github.io/odeint-v2/index.html. After uncomprssing it I found a bunch of header files in its sub folders ( but no .libus files).
I've read that one way to being using it is to create a project and then add all the header files found in the odeint file. However you also need to to use the linker to link a .libus file, which I could not find. I found this confusing and didn't get too far with it.
2.The other thing I tried to do was use a empty file and save it as .cpp in a new folder (I usually work with such files, not projects). Then I dug through the odeint file to find odeint.hpp, which I copied and saved in the same folder as my .cpp file, then I included #include "odeint.hpp" and saved the remaining
odeint files ( ie. the directory ) in the same folder, so that during compilation c++ could find them using odeint.hpp.
This didn't work either.
I've a tried bunch of other things as well that I found online. I didn't really understand them and followed the instructions but nothing worked. I get this exact error : fatal error: boost/numeric/odeint.hpp: No such file or directory in all cases
If someone could help me with installing and using ODEINT, I'd really really appreciate it
Related
I am working with the OpenSSL library for C++. I used this library in another project and it worked great. I carried it over to another project today and I'm having issues.
Two of the header files are .h.in files: opensslv.h.in and configuration.h.in.
In the first project, this was not an issue. But in my new project it gives me an error on this line
#include <openssl/configuration.h>
because configuration.h cannot be found:
...\include\openssl\opensslconf.h(14): fatal error C1083: Cannot open include file: 'openssl/configuration.h': No such file or directory
I understand there is no literal configuration.h file but from what I understand that configuration.h.in file should generate a configuration.h file right?
Does anybody have any idea why that might be happening? Maybe I changed something in the project properties?
.h.in is a template for a header file.
.in suffix looks similar to autotools template files, but according to their FAQ, OpenSSL uses their own build system based on Perl.
Anyway, you should call one of the Configure scripts, and build after that. Docs.
I'm unable to comment, but you need to provide more information about your directory structure. What do you mean by "carried it over"? This most likely sounds like it's happening due to something pointing to the wrong directory. What environment are you working in?
First thing I would do is double check that your project environment is looking in the correct directory for include files.
I also just found this answer that may be helpful to you as well: https://stackoverflow.com/a/31322172/2494727
I recently downloaded a third party library called spline-master from github and the file provides a header file called spline.h. I wanted to use this header file so as to create a spline. I am currently using eclipse oxygen for c/c++. I was pretty new to this and have been stuck on this problem since the last few days. I tried changing so many things to link this file. The file can be seen in my project tree and it's there in the includes but when I write #include"spline.h" it throws me an error telling "there exists no such file or directory".
Can anyone please let me know how I can go about this problem? All the applications are of the latest version including Ubuntu. I would have attached a couple of screenshots so that you can have a better idea about the problem I am facingenter image description here
Thanking you.
Regards,
Sumanth
enter image description here
There are 2 main ways to include a header file, and you need to know where your spline.h is located in order to know which one you can use.
#include "spline.h"
Enclosing in quotes will tell the preprocessor that the path you have supplied is relative to the location of the code file you are including the file into. Your compiler can't find the file which means it must be located in a directory different to the code file you are working on.
#include <spline.h>
This is probably the version you want to use. This version will tell the preprocessor to look for spline.h in any header directories you have defined in your project. Again, it considers the path relative to the header directory.
I am trying to complete the Boost.DLL tutorial (http://www.boost.org/doc/libs/master/doc/html/boost_dll/tutorial.html)
However, I'm not able to even compile their source code, I keep getting:
fatal error: boost/dll/import.hpp: No such file or director
I tried manually copying the header files from the repository (https://github.com/apolukhin/Boost.DLL), but even when I copy these into "/usr/include/boost/" I get new errors from the same kind about "boost/predef/os.h".
I've tried reinstalling the complete boost library and everything, but without success.
Since they describe themselves as "Boost.DLL is a header only library. To start with the library you only need to include header"
It seems like there should be an easier way to fix this than go through the include-errors and manually search for the right files on the internet...
The src file is broken down into different libraries and inside each one is the xxx.c and its xxx.h counterpart. In almost all of my classes I get file not found errors on the first import statement for the .h file. I deleted the "library/" and it removes the error. I was wondering if there is an easier way to to this other than going through each of the 1000 classes and doing this for each of the import statements. I have already included sdl framework in the "Link binaries with Libraries". Please help im lost.
Try using the USER_HEADER_SEARCH_PATHS for paths you want searched for #include "..." You can find this option in Build Settings of Target.
You can specify path like this: $(SRCROOT)/Subfolder/subfolder
Right, I know this is a very stupid question, but I have no luck with w/e i'm trying to do.
I'm trying to use the objdetect.hpp header file, so I've included the folder C:\OpenCV2.1\include\opencv2\ aswell as C:\OpenCV2.1\include\opencv and a whole bunch of other libraries and dlls when I was following the instructions on http://opencv.willowgarage.com/wiki/VisualC%2B%2B_VS2010
But the openCV version in that tutorial were outdated and doesn't even have the objdetect.hpp file. So I went to download the latest one (OpenCV 2.4.0), but now when I complie it, it gives me an error C1083: Cannot open include file: "opencv2/core/core.hpp" No such file directory.
Am I suppost to put all the OpenCV folders/files in the same directory as my C++ project? Or how do I fix it? I've tried putting it in the same place as my C++ project, but when I do a #include "../" the folder doesn't appear.
Again, I know this is a stupid question, but please help.
Let me know if anyone require more info coz I'm not too sure whatelse to put.
Thanks
The best way to manage changing directories for include files is with the compiler options. Im better at linux and g++, where you would just specify different include path locations with -I attributes.
Its generally considered bad practice to use relative and absolute paths in the #include statements. Module paths are ok #include <sys/time.h>, where sys could be considered the module. Include the file with just its name and possibly the module, then handle the location with the compiler options.