Thread overview
OSX DStep / Standard Includes
Apr 26, 2019
Robert M. Münch
Apr 26, 2019
Jacob Carlborg
Apr 27, 2019
Jacob Carlborg
Apr 27, 2019
Jacob Carlborg
Apr 27, 2019
Robert M. Münch
April 26, 2019
I'm trying the new DStep version but have some problems with standard include files:

=> dstep --output ./d -v -I/opt/local/libexec/llvm-5.0/include/c++/v1 myinclude.h
clang version 5.0.2 (tags/RELEASE_502/final)
Target: x86_64-apple-darwin18.5.0
Thread model: posix
InstalledDir:
ignoring nonexistent directory "/usr/include"
#include "..." search starts here:
#include <...> search starts here:
/opt/local/libexec/llvm-5.0/include/c++/v1
/8542414
/usr/local/include
/opt/local/libexec/llvm-5.0/lib/clang/5.0.2/include
/System/Library/Frameworks (framework directory)
/Library/Frameworks (framework directory)
End of search list.
/opt/local/libexec/llvm-5.0/include/c++/v1/string.h:61:15: fatal error: 'string.h' file not found


So I'm wondering what this "'string.h' file not found" means as the file seems to be found... any ideas?

-- 
Robert M. Münch
http://www.saphirion.com
smarter | better | faster

April 26, 2019
On 2019-04-26 17:14, Robert M. Münch wrote:
> I'm trying the new DStep version but have some problems with standard
> include files:
>
> => dstep --output ./d -v -I/opt/local/libexec/llvm-5.0/include/c++/v1
> myinclude.h
> clang version 5.0.2 (tags/RELEASE_502/final)
> Target: x86_64-apple-darwin18.5.0
> Thread model: posix
> InstalledDir:
> ignoring nonexistent directory "/usr/include"
> #include "..." search starts here:
> #include <...> search starts here:
> /opt/local/libexec/llvm-5.0/include/c++/v1
> /8542414
> /usr/local/include
> /opt/local/libexec/llvm-5.0/lib/clang/5.0.2/include
> /System/Library/Frameworks (framework directory)
> /Library/Frameworks (framework directory)
> End of search list.
> /opt/local/libexec/llvm-5.0/include/c++/v1/string.h:61:15: fatal error:
> 'string.h' file not found
>
>
> So I'm wondering what this "'string.h' file not found" means as the file
> seems to be found... any ideas?

You need to install the Xcode command line tools, by running "xcode-select --install". This will create the "/usr/include" directory.

I'm guessing this is because DStep is linked against the open source version of Clang and not the one provided by Apple. The one provided by Apple might be built/configured differently.

-- 
/Jacob Carlborg
April 27, 2019
On 2019-04-26 23:16, Jacob Carlborg wrote:

> You need to install the Xcode command line tools, by running
> "xcode-select --install". This will create the "/usr/include" directory.
>
> I'm guessing this is because DStep is linked against the open source
> version of Clang and not the one provided by Apple. The one provided by
> Apple might be built/configured differently.

If you're on macOS Mojave you need to run this command as well:

sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /

-- 
/Jacob Carlborg
April 27, 2019
On 2019-04-26 17:14, Robert M. Münch wrote:
> I'm trying the new DStep version but have some problems with standard
> include files:
>
> => dstep --output ./d -v -I/opt/local/libexec/llvm-5.0/include/c++/v1
> myinclude.h
> clang version 5.0.2 (tags/RELEASE_502/final)
> Target: x86_64-apple-darwin18.5.0
> Thread model: posix
> InstalledDir:
> ignoring nonexistent directory "/usr/include"
> #include "..." search starts here:
> #include <...> search starts here:
> /opt/local/libexec/llvm-5.0/include/c++/v1
> /8542414
> /usr/local/include
> /opt/local/libexec/llvm-5.0/lib/clang/5.0.2/include
> /System/Library/Frameworks (framework directory)
> /Library/Frameworks (framework directory)
> End of search list.
> /opt/local/libexec/llvm-5.0/include/c++/v1/string.h:61:15: fatal error:
> 'string.h' file not found
>
>
> So I'm wondering what this "'string.h' file not found" means as the file
> seems to be found... any ideas?

I created an enhancement request for this. Hopefully it's possible to fix without having the user installing the SDK in /usr/include. https://github.com/jacob-carlborg/dstep/issues/227

-- 
/Jacob Carlborg
April 27, 2019
On 2019-04-27 09:40:46 +0000, Jacob Carlborg said:

> I created an enhancement request for this. Hopefully it's possible to fix without having the user installing the SDK in /usr/include. https://github.com/jacob-carlborg/dstep/issues/227

Thanks! Your tip worked and yes, OSX out of the box support would be great.

-- 
Robert M. Münch
http://www.saphirion.com
smarter | better | faster