I'm just wondering why SDL1 is saved under standard emscripten path \emsdk-master\upstream\emscripten\system\include but SDL2 during first compilation with USE_SDL=2 under
\user\.emscripten_ports\sdl2\SDL2-version_20\include? This also leads to an faulty includepath #include <SDL2/SDL.h> in Visual Studio Code for Intellisense.
Related
VSCode IntelliSense cannot understand CMake add_definitions.
What can I do for this.
When I use add_definitions in CMakeList.txt.
add_definitions(-DTEST_READING_DEV_ID)
In c file I use
#ifdef TEST_READING_DEV_ID
...
...
#endif
The code block looks like grey.
Use cmake generate file compile_commands.json. Add this in CMakeList.txt
target_compile_definitions(app PRIVATE CMAKE_EXPORT_COMPILE_COMMANDS=1)
Build the project.
Add the file compile_commands.json to VSCode Extension settings file c_cpp_properties.json.
"compileCommands": "${workspaceFolder}/build/compile_commands.json"
This article explains the scheme for the c_cpp_properties.json settings file.
https://code.visualstudio.com/docs/cpp/c-cpp-properties-schema-reference
Now, the code block is not grey.
I'm working on an old erlang code that uses Makefiles to compile.
The makefile defines some "include" paths:
# Erlang include directories.
HRL_INCLUDE_DIRS = \
../include
My module imports modules from that path and uses it:
-include("logger.hrl").
VS Code doesn't seem to find this file (red squiggly line under the include statement and function calls.), because logger should have relative or absolute path.
The Makefile does the magic behind the scenes but VS Code doesn't read it.
How to configure VS Code to read the makefile?
The question is where the red squiggly line is coming from. Are you using the erlang-ls extension? If so, you probably need to configure include_dirs in an erlang_ls.config file in the root of your project.
include_dirs:
- "path/to/include"
I have installed Boost Python in C:\boost in which the installation was run from C:\Program Files\boost_1_65_1 as the root directory.
|C:\
|--|boost
|--|--|bin
|--|--|share
|C:\
|--|Program Files
|--|--|boost_1_65_1
C:\MinGW\bin has been added to system's PATH. In Eclipse, the #include <boost/python.hpp> or anything relating to <boost\[directory]> keeps returning 'Unresolved inclusion' error.
I have added C:\MinGW\bin to system's 'Path'. In Eclipse I added the following to GNU C++ 'Include directories' in 'Paths and Symbols':
C:\boost
C:\Program Files\boost\boost_1_65_1\libs
C:\Program Files\boost\boost_!_65_1\boost
C:\MinGW\lib\gcc\mingw32\5.3.0\include\c++
What are the settings that need to be edited?
bjam --debug-configuration has to be run from the root folder
C:\Program Files\boost\boost_1_65_1
At the end of the compilation, go to
Project Properties > C/C+ Build
and add the links to the compiler include paths (in my case it was Cross G++ Compiler > Include). The boost library should now be accessible from #include <boost/whatever>.
I'm using JNI in Android development. I want to know where do the compiler find the referenced .h files?
Here in jni/jni_part.cpp, it includs lots of .h files. Opencv related files are defined by the SDK, but the "cartoon.h" is sure to be a project-specified header. But I cannot find it in the project folder. Then do the eclipse compile the JNI c++ code at every run? If so , in which directories does the eclipse find these headers?
Maybe it's basic for JNI but I'm not familiar with it. So plz help me out with one or two sentences. Or you could just paste a simple tutorial for JNI in Android, eclipse.
#include <jni.h>
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/features2d/features2d.hpp>
#include "cartoon.h"
#include "ImageUtils.h" // Handy functions for debugging OpenCV images, by Shervin Emami.
using namespace std;
using namespace cv;
extern "C" {
.....
This is my eclipse project folder structure
/project
/jni
jni_part.cpp
/src
something.java
You'll need to start using android-ndk to compile the .c, .cpp files to a .so library object, which you can then use in your android project.
Please refer to the Android NDK to get started.
http://developer.android.com/tools/sdk/ndk/index.html#GetStarted
you can find examples in the NDK download.
If Eclipse "knows" where cartoon.h file is on disk, it will help you find it - put the cursor on that #include line and press F3.
Regarding your other question: Eclipse compiles only if the relevant files (sources, headers, or mk) change.
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