Xcode unable to find Eigen in workspace - xcode

I'm working on Xcode 7.0.1. I'm working with CGAL 4.7. I have a mesh that I want to refine using fair() and refine() as shown in this example.
I initially copied the code and ran it in Xcode and it gave me this error:
/Users/.../Desktop/CGAL-4.7/include/CGAL/Polygon_mesh_processing/fair.h:133:5: Static_assert failed "The function fair requires Eigen3 version 3.2 or later."
Subsequently, I added usr/local/Cellar/eigen/3.2.6/lib and usr/local/Cellar/eigen/3.2.6/include/eigen to Library Search Path and Header Search Path. Eigen is working, I run some sample code to test. But, I'm still getting that error.

As documented here you can set the environment variable EIGEN3_INC_DIR to the directory contain the Eigen directory containing the header files before running CMake.

Related

Incorporating charls into a MacOS application

Charls is an implementation of the JPEG-LS lossless and near-lossless coder/decoder. I downloaded the source code, built it in Xcode, and ran it on MacOS. From a few tests I ran, it seems to be reliable and very fast.
Now I want to incorporate charls into my application. I added the static library libcharls.a to my Xcode project and added the header file charls.h. When I try to do a build, I get the error: library not found for -lcharls. I then added a path to libcharls.a in the Library Search Paths of the Build Settings for the Project in Xcode. Still get the same error. Anyone have suggestions for getting this to build? TIA.
To answer my own question: adding the path to libcharls.a in Library Search Paths does fix the problem, but you only add the path, but not the file libcharls.a.

Getting OpenGL function error when profiling but not when running

I have a cocos2d-iphone project. When I run the project on simulator I don't get any error. But if I try to profile it I get multiple errors in OpenGl functions found inside CCParticleSystemQuad.m file. To make it clearer I'm posting the snapshot of the error zone.
Here's the link to the image in case you want to see it closely.
Do you have any clues?
offsetof is a macro that resolves to an LLVM compiler builtin function. It's defined in stddef.h, but it's possible your project's headers don't include that file when building for a device.

Still I receive an error "LINK : fatal error LNK1104: cannot open file 'opencv_ffmpeg231.lib"

Beginner in Image Processing with OpenCV. I am trying to load an Image in VS2010 with OpenCV 2.3.1. However I have the libraries included and the system variables updated. I have checked couple of other forums suggesting using a different version of OpenCV. I have tried using OpenCV 2.4.0 and 2.3.0 and its the same error I receive. Any workaround for this would break the barrier!!
I would suggest that you check to make sure your directories and environmental variables are entered correctly. Then try manually retyping the libraries in the linker, carefully making sure you entered it correctly.
Check in your 'lib' folder (C:\opencv\build\x64\vc10\lib) to make sure you put the right file name in your additional libraries. For example, you could have file opencv_ffmpeg231.lib from version 2.3.1. This may have been the case during the making of the tutorial but change the number to your current version.
i.e, for version 2.4.7 it would be *opencv_ffmpeg247.lib*
just check your "lib' folder to make sure they're the same name
Also, Try this youtube Tutorial for installing OpenCv on Visual Studio. --> http://www.youtube.com/watch?v=cgo0UitHfp8

Mac Ogre Xcode project can't find headers

While trying to get the template Xcode 4 ogre project to work, the build fails because it can't find OgreCamera.h.
I've installed Ogre to /opt/local/lib/OGRE, and specified that as the Ogre SDK location when creating the Xcode 4 project.
Needless to say, the header and framework include paths in the project settings point exactly to where all the header files are, yet not one of them can be found. I've tried commenting out the include of OgreCamera.h, and upon trying to run, the next include, OgreEntity.h, cannot be found. Commenting that out and running again, the next include can't be found, and so on (these includes are in OgreFramework.h.
I don't understand why these headers, which clearly exist when I go look for them in the Finder or Terminal, can't be found by the project, even when I specify their full path like this:
#include </opt/local/lib/OGRE/lib/release/Ogre.framework/Versions/1.7.4/Headers/OgreCamera.h>
Did I somehow install the Ogre SDK incorrectly? (I copied it from the DMG into placeā€¦)
I had the same problem, and found partial success by following rjstelling's answer from this thread:
why can't Xcode find this header file?
That solved the OgreCamera.h include issues, but now I'm stuck on including the boost libraries. They are not picked up on the search paths, or in the Indexing group as suggested in the thread above.
Basically it looks like a bug in XCode4 that has to be worked around until a patch is released. There is also more information here:
Compile, Build or Archive problems with Xcode 4 (and dependencies)

Reusing OpenCV 2.3.1 bundled image Stitching module

I am lost in a rabbit hole, please bear with me.
I'm trying to use the OpenCV Stitching module from the 2.3.1 Win superpack distribution. I dragged all the source files in /modules/stitching into a Visual Studio project, resolved the Includes and Libs as best I could, and got it to compile.*
The first strange runtime error I had was that I could not read a JPG file from disk with imread(). It did not throw an error, but was returning true for myImage.empty(). I reverted to cvLoadImage() and then it worked.
Now, after that, there is a new runtime error:
Unhandled exception at 0x00870d8f in MyStitcher.exe: 0xC0000005: Access violation writing location 0x010e7000.
This occurs in /modules/stitching/matchers.cpp when trying to pass reference to features.keypoints as a detector_->detect() argument. I assume detect() is supposed to populate the keypoints with its result. features appears to be uninitialized (it has 612933850 empty keypoints at the breakpoint). Now this is starting to sound like the source I'm trying to compile is just broken, but opencv_stitching.exe that comes prebuilt works just fine. Was it compiled from different source?
By the way, I do not know how to use the CMake system to generate Visual Studio projects, as recommended, for OpenCV. The CMakeLists.txt file in the /modules/stitching folder did not work. Is it not supposed to be used as a starting point?
*One note on this: CMakeLists.txt in /modules/stitching specifies some
libs named opencv_core, opencv_imgproc, opencv_highgui, etc. (without
a version indication) but the libs included with OpenCV 2.3.1 Win32
superpack (which I'm linking to) are named opencv_core231.lib,
opencv_imgproc231.lib, etc. Is this a clear indication that I am using
mismatched binaries for the stitching module?
I got this working after building the latest from the OpenCV SVN. The stitching module came a long way since the 231 release.

Resources