Reputation: 5355
It seems that some of my Mac OS X systems have /usr/include/mach-o/loader.h and others don't. I'm confused because this file is documented here:
For example:
...Declared in /usr/include/mach-o/loader.h. See also mach_header_64.
Does anyone know if this file was removed on any newer versions of Mac OS X? Or if I need to install a special SDK to get it?
Upvotes: 3
Views: 2321
Reputation: 86651
It exists on my Mac (OS X 10.7), but I do have Xcode installed and it might have come as part of that.
Edit
Note that when Xcode compiles anything, it doesn't use the headers in /usr/include
but the ones in the SDK you have chosen and you can find out where the system headers are by doing a compile and then checking the -isysroot command line switch. So I have just done a compile and the compiler invocation includes:
-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7sdk
If you open that directory, you'll find it contains a usr/include/mach-o
subdirectory with the file you want in it.
Upvotes: 2
Reputation: 5852
loader.h is a hidden file on MAC, so if you don't have hidden files viewable open up a terminal first do this command:
defaults write com.apple.finder AppleShowAllFiles TRUE
then this command:
killall Finder
After that follow the path in the finder: /usr/include/mach-o/loader.h
If you do have hidden files all I can say is that I have a OS X 10.7, 10.6 and 10.5 laptop and they have it and have Xcode installed to.
Upvotes: -1