Using Eigen on Mac OS X for XCode - c++

I'm triying to use Eigen on Xcode but I always get the "file not found" error. I installed Eigen using Homebrew, who puts it on
/usr/local/Cellar/eigen/3.2.9
but when adding this path to the "Header Search Paths" I keep getting the "file not found" error. Is there any other way of using Eigen on Xcode?
EDIT: also tried with
/usr/local/Cellar/eigen/3.2.9/include/eigen3
and I keep getting the "file not found" error.

It probably should be
/usr/local/Cellar/eigen/3.2.9/include/eigen3
You need read the detailed error message and compare with the folder above to confirm the not-found file is there.

Related

Cannot find Valgrind executable for use with CLion?

I am trying to connect Valgrind with CLion 2020.2.1 for testing purposes, but CLion (and perhaps I) cannot locate the Valgrind executable.
The path I am currently using is:
\\wsl$\Ubuntu\usr\bin\valgrind
But when I try to run anything with Valgrind using this path I get a message stating that it cannot run the program because of this error:
CreateProcess error=193, %1 is not a valid Win32 application
Which seemed to make sense upon further research, as what I am selecting (\usr\bin\valgrind) appears to be a .cpp source file and not an executable - as the error would indicate - but now I don't know what the issue is. If that isn't what CLion is looking for, then where is the file it is looking for?
Have also tried path '/usr/bin/valgrind/' which resulted in "Valgrind executable not found." when I tried to compile.
If anyone has any advice it would be greatly appreciated!!

Xcode gives error when I add libraries: dyld: Library not loaded

First I wanted to learn SDL in xcode, but when I try to add SDL framework this error pops up and I can't understand why. I looked on the internet for 2 days but couldn't find any solution. After 1 month (now) I'm trying to add GLFW to xcode but this error got me again. Why is this error happening?
dyld: Library not loaded: /usr/local/opt/glfw/lib/libglfw.3.dylib
Referenced from: /Users/durdukolk/Library/Developer/Xcode/DerivedData/Graphic-dutmtfjytmmfetggltqeajfkggms/Build/Products/Debug/Graphic
Reason: no suitable image found. Did find:
/usr/local/opt/glfw/lib/libglfw.3.dylib: code signature in (/usr/local/opt/glfw/lib/libglfw.3.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
/usr/local/Cellar/glfw/3.3.4/lib/libglfw.3.3.dylib: code signature in (/usr/local/Cellar/glfw/3.3.4/lib/libglfw.3.3.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
I finally found the solution.First you need to open "Enable hardened runtime" in section Signing in the project file.
And need the check "Disable Library Validation" at product menu.
For more detail: https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_cs_disable-library-validation

Kylin odbc driver C++ solution fails to build

I am unable to build Kylin ODBC C++ solution.
I followed the instructions found here, unfortunately, I get an error when I try to build the solution.
I am getting the below error message:
Error LNK1181 cannot open input file
'zlibstat.lib' Common C:\Users\user1\Documents\Visual Studio
2015\Projects\kylin-master\odbc\Common\LINK 1
When I include the zlibstat.lib file, I get an error message saying that it is already included.
The Error looks like your zlibstat.lib cannot be found.
Please check whether ZLIB_HOME is set in Environment Variables and whether project zlib is well compiled.
You can verify with check in file Common.vcxproj .
For example you want to build with Release|x64, please check whether can find zlibstat.lib in location $(ZLIB_HOME)\contrib\vstudio\vc11\x64\ZlibStatRelease.

"Abort Trap: 6" when attempting OpenCV video capture on macOS Mojave

I've tried on both Python on C++, and every time I call cap.open(0), I get an Abort Trap: 6 error. I haven't been able to find any solutions to this via Google, and have tried reinstalling OpenCV several times now. Any suggestions?
iTerm might be messing things up for you. It worked for me when I used the normal terminal.
Most likely your mac blocks the webcam access.
Check
System Pref -> Security & Privacy -> Privacy -> Camera.
If the app that you try to use is not listed there, opencv produce "Abort trap: 6"
In VSCode:
Do cmd+shift+p
Enter "shell command: Install code in PATH"
Close VS Code
Use sudo code to open VS Code
It will give a warning not to run as a root user
Ignore the warning and run the file, and you will not get the "Abort trap: 6" error anymore.
install code in vsstudio code and then open terminal and type code, it will open visual studio code and it will have all the permisions.

Graphic_failure in OCaml

Here's what I wrote in Ocaml top-level
# #load "graphics.cma";;
# open Graphics;;
# open_graph " 400x600" (* Note the leading space. *);;
But I got the error
Exception: Graphics.Graphic_failure "Cannot open display ".
What I tried
I tried to change the DISPLAY variable of my environnement to :0.0, and the error message becomes "Cannot open display :0.0"
I'm on OSX Capitan V10.11
I guess the problem is you don't have any X11 Windows System (as stated here https://support.apple.com/en-us/HT201341)
You should install XQuartz : http://www.xquartz.org/