I’m trying to build my audio synth plugin in Mac OSX Mojave in XCode and I am getting file not found for
#include
in juce_StandardHeader.h.
The odd thing is I have had no problem building my source in XCode over the last few years and this problem is now occurring even though I have not changed anything. The only thing different is a few files in my source code. I did not mess with any other JUCE settings or XCode settings. The projucer module paths appear to be correct.
I can’t do my next release until I resolve this so any help would be much appreciated and I will provide more data if needed. Here is the log text for the error.
warning: include path for stdlibc++ headers not found;
pass ‘-std=libc++’ on the command line to use the libc++ standard library
instead [-Wstdlibcxx-not-found]
In file included from
/Users/fathom/Documents/Fathom/Fathom/Source/Zeksum.cpp:2:
In file included from
/Users/fathom/Documents/Fathom/Fathom/Source/
…/JuceLibraryCode/JuceHeader.h:18:
In file included from …/…/…/JUCE/modules/juce_audio_basics/juce_audio_basics.h:60:
In file included from …/…/…/JUCE/modules/juce_core/juce_core.h:182:
…/…/…/JUCE/modules/juce_core/system/juce_StandardHeader.h:55:10:
fatal error: ‘memory’ file not found
#include
[memory]
1 warning and 1 error generated.
The brackets around “memory” are the standard less than greater than characters.
Hi Thanks for responding.
I’m not familiar with Homebrew so its not something I would have installed intentionally.
When I run that terminal command I get the following:
xcode-select: error: unable to get active developer directory
use sudo xcode-select --switch path/to/Xcode.app to set one.
The error from
xcode-select
makes sense with the errors you are getting in Xcode.
Where is Xcode installed? If it is located at
/Applications/Xcode.app
(which is the standard location), you should run
That’s odd XCode is not in my Applications folder, it is in:
/Users/fathom/Downloads/Xcode.app
I suppose that is not important since it runs
but in regard to your command I did the following:
sudo xcode-select -s /Users/fathom/Downloads/Xcode.app/Contents/Developer
But it is asking for a password. Do you happen to know the password parameter, I tried -p but that is not it.
It’s my machine only and I am the administrator. I have noticed in OSX that many commands which involve any OS related or application related activity requires the user login password so I am assuming that the command you are recommending needs a password parameter such as -p mypassword or -password mypassword. I’m not sure what that would.
Also, what kind of information were you intending to fetch with that command?
No, I am unable to type anything in. What are we trying to achieve with this terminal command?
I checked all my JUCE paths which look correct. However I’m not sure where the memory file is located. Is that a system file which JUCE is not finding? Could be I need to specify a system path for OSX so JUCE can find the file. I’m a Windows guy not a Mac guy so I’m not sure how to do that.
It looks to me like the original source of the problem is in juce-core/system/juce_StandardHeader.h #include memory, where memory is between the standard less than greater than characters.
My guess is that this memory file location is not in the OSX path. So perhaps the solution is to find this file, display the current system path and add the location to the path. Like I said I’m not a Mac guy so not sure the right commands to do this.
When I run that terminal command I get the following:
xcode-select: error: unable to get active developer directory
use sudo xcode-select --switch path/to/Xcode.app to set one
This is your own password, not the password of an admin.
On Unixes and OSX sudo asks for admin privileges, you only need to verify your own identity. The property that you are allowed to run administrative commands is set in your system preferences.
Technically you can make your shell (terminal) run as administrator calling sudo su -i but I would discourage that, because it changes some other settings as well that you might be unaware of at the moment.
BTW: did you ever run Xcode or only in the terminal? I think if you run the Xcode as regular app it will install some additional tools that you might lack at the moment.
@FathomSynth this is what I get when I open Terminal and run sudo xcode-select -s /Applications/Xcode.app/Contents/Developer: Screenshot 2022-03-09 at 00.00.53760×477 17.4 KB
I then type my password (which doesn’t show up in any way) and press the ENTER key: Screenshot 2022-03-09 at 00.02.36760×477 18.6 KB
Calling xcode-select -p confirms that it is now setup as specified: Screenshot 2022-03-09 at 00.04.09760×477 23.2 KB
If what you get doesn’t match these screenshots, feel free to make some (CMD + SHIFT + 4 + SPACE to capture a specific window) and share them here.