Compilation Error on #include <algorithm> Algorithm:No such file or Directory - iphone

I want to use OpenCV and Open SURF libraries in one project along with ARToolKitPluas then it gives me error "Algorithm:No such file or Directory" which i tried my best to fix but can't. Please Help me. Really i am in trouble and need your help.
Thanks

Your source file is probably being compiled as ObjC or C. It should be C++ (.cpp) or ObjC++ (.mm).

My Problem Solved by setting the following
#import <opencv/cv.h> in .pch file
Providing path for includes in Header search path
Providing path for libraries in Library search path
Also changing class name to .mm
writing this -lstdc++ -lz in Other linker flags
And most important issue that i observed is that the project folder name should not contain space for example if project folder name is AR Camera then change it to ARCamera otherwise it will give errors

May be you have not added Application.mk file in your project.

Related

How to remove error alert of header-only cmake project in vscode

When I develop a project that output is a shared library or executable, normally, I will use include_directories in the CMakeLists.txt of root directory. In such case, before I include a header within a translate unit, I can't use angle brackets to let headers include each other. I think it is because files in include_directories is not a part of project. I can fix this by using relative path, but when I have to import external project, this can not fixed easily.
Assume that I have a external project with a root CMakeLists.txt, which has this snippet
add_library(mylib INTERFACE)
target_include_directories(mylib INTERFACE .)
and the directory seems like this
└──external
├───mylib.hpp
└───CMakeLists.txt
I want to import this project, and I'm writing a header-only project. The file tree seems like this
├──external (above)
├──include
| ├──header.hpp
| └──CMakeLists.txt
└──CMakeLists.txt
The CMakeLists.txt in root directory is simply add_subdirectory(include), and here is the CMakeLists.txt in folder include
add_library(Header INTERFACE)
target_include_directories(Header INTERFACE .)
target_link_libraries(Header INTERFACE mylib)
Theoretically, I can now include mylib.hpp by #include <mylib.hpp>, but it is not the case. VSCode tells me it can't find this header file. As much as I know, the only way to solve this is add a translate unit and let the implementation code include the header.hpp. I have tested this several time. VSCode won't report this error as long as I add a cpp file and include that header, and once I remove the cpp file, the error appears again.
By the way, I have set "C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools" in configuration file of vscode.
Please tell me how to fix this without a translate unit.

error generate in SonarFramework.h #include "extensions/cocos-ext.h" file not found

I using the cocos2dx c++ for game devlepoment.Now I want implement sharing in game.I add the sonarcocoshelpercpp folder in class folder and social.framework in framework folder then gnerate the error on sonarFremework.h file that is "extensions/cocos-ext.h" file not found.Any solution for this issue??
You will need to check the Header Search Paths under Build Settings for the build target that is emitting this error, and ensure that the headers list includes all the relevant cocos folders.
If you installed your project using the Cocos Launcher then the first (and for that #include critical) entry should be
/Applications/Cocos/frameworks/cocos2d-x-3.7
(Assuming, from the tags, that this is a XCode on Mac project)

Cannot access folder path header file in solution

I imported one project to another project by following this link tutorial
successfully build that two project. But when I added
#import <SampleSubproject/SampleSubproject.h> this to my main ViewController.m file error be occur.
Error : "SampleSubproject/SampleSubproject.h" file is not found.
Why is that error occurred ??
Is there any error ?
Please help me guys!
You have Headers search path settings at project configuration. Let's say there're directories A and B. With "SampleSubproject/SampleSubproject.h" Xcode looks for SampleSubproject.h at A/SampleSubproject/SampleSubproject.h and B/SampleSubproject/SampleSubproject.h. If there's a checked recursive flag for any directories, the search is performed at this directories and their subdirectories.
Now you'll need to check what is the headers search path for the target you are building keeping in mind that you might have several targets and the file with the import might not be included into all the targets.
As you also have a red library, you'll want to check the Libraries search path as well, it works in the same way.

WhirlyGlobe : Getting compilation error while trying to use framework

I am trying to use the open source app WhirlyGlobe from link: http://code.google.com/p/whirlyglobe/
I am using following steps to use it in my app:
adding framework to application framework.
Copying the supporting files to my project (Utilities folder from whirlyglobe code) and setting Header Search Path as utilities/boost_1_45_0 & utilities/eigen-eigen-3.0.1
renaming my file to .mm and then trying to draw the map.
Problem here is i am getting compilation error :"'set' file not found".
This file is present under 'Utilities' folder. I am not getting what wrong i am doing. I even tried changing header paths but didn't helped.
If anybody have used this library , please help me out telling correct steps.
Thanks,
Amit
Change the extension of your file from .m to .mm

Eclipse c++ with mingw comiler cant build boost regex example, can find .a library files

I'm trying to build the boost regex example in eclipse using mingw on vista.
I built boost ok with mingw as there are library files XXXX.a.
I could build/compile the first boost example that doesnt require any of the compiled boost libraries.
When I compile the regex example I get a linker error saying it cant find the library file.
I have tried various libray file names eg leave off the .a extension, leave off the lib prefix etc.
Now the interesting thing is that if I leave off the library extension and rename the library file to XXX.lib it works and runs ok.
So why cant it read the .a library file?
It must be my setup somewhere but I dont know where or what to set.
From what I read everyone is ok linking the .a file except me :(
Thanks in advance,
Kim
Is this similar to this thread?
I built the stock Hello World with no problems and added a second "utilities" static library project for practice. I did the following:
checked "utilities" as a project reference for Hello World.
added libutilities as as a lbrary to "Hello World" project library list.
added "${workspace_loc:/utilities/Debug}" as the dir path for libs. (libutilities.a lives there). (also tried the "file system" version of this.)
Clean and build results in the following error:
g++ -LC:\projects\fargo\utilities\Debug -ohello_world.exe src\hello_world.o
src\c_template_class.o -llibutilities
C:\mingw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe:
cannot find -llibutilities
collect2: ld returned 1 exit status
To link a library libutilities.a, the command line option should be -lutilities