Problem compiling on latest macOS

Hi,
I try to compile my JUCE project on the latest macOS version (using make). When I build the project, I got this error:
fatal error: ‘TargetConditionals.h’ file not found
#include <TargetConditionals.h> // (needed to find out what platform we’re using)

Looking in ‘juce_TargetPlatform.h’ this file is used when compiling for Apple to determine the target (macOS ou iOS I supposed). I asked myself if Apple has not dropped this file for its latest OS?

Any idea how I can do (or want I haven’t installed perhaps)?
Thans.

For whatever reason, it seems that the installation of cake was broken during the last update of macOS. I have reinstall it, and now it works.

I hit the same problem after an upgrade. Running Xcode 13.3 now, but compile in CLion on an M1.

I followed the link:

But it turns out my commandline tools seem ok:

➜  ~ xcode-select -p
/Applications/Xcode.app/Contents/Developer
➜  ~ ls -la /Applications/Xcode.app/Contents/Developer
total 0
drwxr-xr-x   9 root  wheel  288 Mar 16 09:11 .
drwxr-xr-x  18 root  wheel  576 Mar 16 09:32 ..
drwxr-xr-x   4 root  wheel  128 Mar  3 12:11 Applications
drwxr-xr-x   7 root  wheel  224 Mar 16 08:49 Library
drwxr-xr-x   6 root  wheel  192 Mar 16 08:49 Makefiles
drwxr-xr-x  10 root  wheel  320 Mar  3 11:55 Platforms
drwxr-xr-x   3 root  wheel   96 Feb 18 21:39 Toolchains
drwxr-xr-x   8 root  wheel  256 Mar 16 09:11 Tools
drwxr-xr-x   6 root  wheel  192 Mar  3 12:09 usr
➜  ~ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

Has anybody another idea what to check?

What I did was:

  1. Reinstall cmake.
  2. Ensure that the global link to cmake points to the latest version.
  3. Do a “cmake …” in the build directory.

I owe an apology after all the unexcusable curses I sent to Cupertino…

Wiping all build folders (I had accidently two, one for JUCE and one for the actual project) triggered a full rebuild of juceaide and all back to normal.

Thanks for sharing your solution, wasn’t necessary in my case.

1 Like