Trying to compile C++ Code to call it from Matlab. Issue with dependencies. Please help! :)
2 views (last 30 days)
Show older comments
Hi,
I've been trying to compile on Windows an algorithm to estimate noise sigma, but with many hurdles. The source code are in C++ in this link: http://www.ipol.im/pub/art/2013/45/
I'm trying to call it from Matlab for a school project, so I'm aiming to make some mex function or compiling the code as a .dll shared library in order to be able to call it from Matlab.
But I get stuck in both ways with a similar issue.
I've tried to compile the Makefile and the .cpp files in many ways and with different compilers (mingw, cywin, sdk, etc), but the compilers agree that the file "execinfo.h" is not included.
I've also tried downloading "execinfo.h" and adding it to the compilers "include" folder. That's ok, but then the compiler keeps asking for more and more dependecies like "fftw3.h", "png.h", etc , etc. Ive downloaded all of them until I found some of them that are not available on the web. Anyway I guess that this solution was not going to work at all.
The main question is if these Makefile and .cpps are compatible with Windows, and how to compile them correctly. Why are all these .h files missing? These code are supossed to be verified and tested.
Now i'm trying to compile teh makefile with Linux. But I thought with "Cywin" compiler I could compile any code written in Linux..
As you can guess, I'm newby to C++, and it's compilers. But I really need to run these codes to improve some performance in my Matlab project.
Please if you could give some answer I'd be really greatful. Thanks in advance!!
0 Comments
Answers (1)
Titus Edelhofer
on 16 Jul 2015
Hi,
looking at the code and the line
#include <execinfo.h>
with < > instead of " " indicates that this is a system header file. Downloading this file only doesn't help, because it references other system header files as well. So straight forward this will work on a linux machine.
I admit it's quite a while that I used cygwin: I'm not sure if it provides those additional system header and library files. Downloading individual header files will definitely not work, since you need the code from the libraries as well ...
Titus
See Also
Categories
Find more on Troubleshooting in MATLAB Compiler SDK in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!