Fatal error: mach-o / dyld.h: No such file or directory
I am trying to compile this src on my Ubuntu 14: https://github.com/Bohdan-Khomtchouk/HeatmapGenerator/blob/master/HeatmapGenerator2_Macintosh_OSX.cxx .
To compile this source code, run: fltk-config --use-images --use-gl --compile HeatmapGenerator2_Macintosh_OSX.cxx
However, I am getting the following error:
HeatmapGenerator2_Macintosh_OSX.cxx:52:25: fatal error: mach-o/dyld.h:
No such file or directory
#include <mach-o/dyld.h>
^
compilation terminated.
I have looked at http://ubuntuforums.org/showthread.php?t=1623945 but that didn’t help solve my problem.
Is the #include <mach-o/dyld.h>
preprocessor directive invalid in Ubuntu? Little has been written about this on the Internet. Perhaps it is an Apple specific library that cannot be included in Ubuntu?
Any suggestions on how to work around this error and generate an executable file successfully is greatly appreciated.
EDIT
When I comment out the #include <mach-o/dyld.h>
preprocessor directive , I get the following error:
HeatmapGenerator_Macintosh_OSX.cxx:568:13: error: use of undeclared identifier
'_NSGetExecutablePath'
if (_NSGetExecutablePath(path, &size) == 0)
Is there a way to get around this error without using this preprocessor directive? _NSGetExecutablePath
only used once in src, maybe there is an alternative ...
source to share