Include errors detected. Please update your includePath. Cannot open source file "avr/interrupt.h" - visual-studio-code

Within Visual-Studio-Code, I was recieving the error in the title from #include <Arduino.h>. The files compile in the Arduino app.

To solve the problem, add the following paths to your includePaths in your .vscode/c_cpp_properties.
"/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino/",
"/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/EEPROM/",
"/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/SPI/",
"/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/SoftwareSerial/",
"/Applications/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire/",
"/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/",
"/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/avr/",
"/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/compat/",
"/Applications/Arduino.app/Contents/Java/hardware/tools/avr/avr/include/util/"

Related

mex compiler could not find include path in .h files

Hi I'm using MEX in Matlab.
The c code uses boost and a lot of headers are included.
And at first my problem is like this
>>mex readTrackletsMex.cpp
readTrackletsMex.cpp
e:\kitti\tools\devkit\matlab\tracklets.h(7) : fatal error C1083: can not open include file:“boost/serialization/nvp.hpp”: No such file or directory
This is because the include path is not specified. So I copied the headers into "/include/boost/XX" and added "-I" flag.
This time it seems that the compiler cannot find the include path in one of the header file.
>> mex -Iinclude readTrackletsMex.cpp
readTrackletsMex.cpp
include\boost/serialization/nvp.hpp(21) : fatal error C1083: can not open include file:“boost/config.hpp”: No such file or directory
Any idea on this? How do I specify a "global" include path for the compiler?
Thanks for your time.
You could try adding the include paths to the environment variables C_INCLUDE_PATH and CPLUS_INCLUDE_PATH. The other issue may be that you put in -Iinclude, and not -I/include

OpenCV Eclipse configuration in linux

I want to configure eclipse-cdt for opencv in ubuntu. I followed the tutorial Using OpenCV with Eclipse (plugin CDT). However, I was ended up with error message
fatal error: cv.h: No such file or directory DisplayImage.cpp /opencvtest line 1 C/C++ Problem
I checked my configurations as indicated in the tutorial. Everything was fine except the information in 8.b.
As tutorial says for pkg-config --libs opencv, the output should be,
-L/usr/local/lib -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann
But in my case the output was,
/usr/local/lib/libopencv_calib3d.so /usr/local/lib/libopencv_contrib.so /usr/local/lib/libopencv_core.so /usr/local/lib/libopencv_features2d.so /usr/local/lib/libopencv_flann.so /usr/local/lib/libopencv_gpu.so /usr/local/lib/libopencv_highgui.so /usr/local/lib/libopencv_imgproc.so /usr/local/lib/libopencv_legacy.so /usr/local/lib/libopencv_ml.so /usr/local/lib/libopencv_nonfree.so /usr/local/lib/libopencv_objdetect.so /usr/local/lib/libopencv_photo.so /usr/local/lib/libopencv_softcascade.so /usr/local/lib/libopencv_stitching.so /usr/local/lib/libopencv_ts.so /usr/local/lib/libopencv_video.so /usr/local/lib/libopencv_videostab.so
Can anyone help me to fix this problem.
Thank you in advance.
Try to change your header from:
#include <cv.h>
#include <highgui.h>
to:
#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui.hpp>
Thank you for all the answers. But the gain for the problem is bit strange. Here is it.
I am using ubuntu 12.1. I installed opencv using "git" as in the doc. Installation was completed without errors, but i received the above mentioned error.
Since any of the answers (#Alexander and # Ann) didn't make any effect, I re-installed opencv using the downloaded file from "sourceforge". Then it worked perfectly. I think the problem was with the file I downloaded through git.
Anybody has any reason for this issue ?

Adding QtCore Library in blackberry 10 sdk

Hi guys I am creating a simple game using cocos2d-x and blackberry. I need some place to store my game settings, something similar to shared preferences in ios and android. I found some code using qsettings, but the problem is I am not able to add the QtCore library.
I add the library using RightClick->configure->add Library and Standard BlackBerry Platform Library. The library gets added successfully.
#include "dataProcessor.h"
#include <QtCore>
void dataProcessor::setup(){
QDir dir;
dir.mkpath("data/files/text");
dir.cd("data/files/text");
}
but when I compile the above code, I get the error C:/Users/I076636/Documents/target_10_0_9_1673/qnx6/usr/include/qt4/QtCore/qatomic.h:45:28: fatal error: QtCore/qglobal.h: No such file or directory
But I noticed 2 things,
1.qglobal.h file is there inside the QtCore directory I have included.
2.inside qatomic.h if I change
#ifndef QATOMIC_H
#define QATOMIC_H
#include <QtCore/qglobal.h>
#include <QtCore/qbasicatomic.h>
into
#ifndef QATOMIC_H
#define QATOMIC_H
#include <qglobal.h>
#include <QtCore/qbasicatomic.h>
the error for qglobal goes and now the same error comes for qbasicatomic.h.
I think it is something simple like incorrect mapping between QtCore keyword and include directory or something..
Please do have a look.
The IDE is made on eclipse.
You can understand what is going wrong if you look closely at the error message:
/target_10_0_9_1673/qnx6/usr/include/qt4/QtCore/qatomic.h:45:28:
fatal error: QtCore/qglobal.h: No such file or directory
The error isn't in your inclusion of QtCore, but is occurring inside QtCore/qatomic.h, on line 45 (you can find this file in the [YOUR BBNDK DIRECTORY]/target_10_0_9_1673/qnx6/usr/include/qt4/QtCore/qatomic.h):
#include <QtCore/qglobal.h>
qatomic.h is already in the QtCore directory, and you'll find a qglobal.h directory there as well. So what this means is that qatomic.h expects the parent directory to be on the include path, so that including <QtCore/qglobal.h> will work.
So you just need to add [YOUR BBNDK DIRECTORY]/target_10_0_9_1673/qnx6/usr/include/qt4 to your include directories.
Do it like this:
Right click over your project in Project Explorer and choose Properties
Expand the tree to C/C++ General / Paths and Symbols
Change the Configuration in the Paths and Symbols frame to [All configurations]
Click the Includes tag and select GNU C in the Languages list (or do this for every language).
Click Add... and type ${QNX_TARGET}/usr/include/qt4 and press OK
Click Add... and type ${QNX_TARGET}/usr/include/qt4/QtCore and press OK
Now your include of #include <QtCore> should work.
Next up: linking errors ;-)
It sounds like your BB10 NDK did not get installed properly, or your project wasn't set up properly. If you expand your project and the Includes you should see (along with others):
<NDK_INSTALL_LOCATION>/target_<VERSION>/qnx6/usr/include/qt4/QtCore

mpglib_interface.c 'interface.h' file not found

I an trying to compile the WunderRadio app source code available here http://dev.wunderground.com/support/wunderradio/wunderradio.1.9lgpl.zip. After making all the modifications to the project to compile on iOS5 i get the following error:
Lexical or Preprocessor Issue 'interface.h' file not found.
Of course i tried getting the interface.h from the lame library that i previously downloaded, and added it to the project with no luck. Apparently its not the right file.
What am i missing ?
I found this file at:
http://code.google.com/p/live-converter/source/browse/trunk/include/interface.h?r=13

matlab to c++: Cannot open include file: 'mclmcrrt.h': No such file or directory

We tried to complie the m file to c++ file by matlab complier. We had the file bulit but we got the error msg as follow.
fatal error C1083: Cannot open include file: 'mclmcrrt.h': No such file or directory
Do you have any ideas about the error msg? Any suggestion will be appreciated. Thanks a lot.
Ying
This error message is caused because you need MCR dlls.
You should locate the h file in "C:\Program Files (x86)\MATLAB\MATLAB Compiler Runtime\v715\extern\include\"
and add it to your include path in C.
Check out the manual of Matlab compiler.