"xCode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild" error

Continuing the discussion from "LIBPF is not yet activated on this computer" error when launching a model:

Mmmh did you perform the step in the “HOWTO install a LIBPF SDK for OS X” where you have to type in the terminal the command:

xcode-select --install

? Or just lauch the /usr/bin/xcodebuild command in a terminal as the error message suggests ?

As i show you in the image xCode is correctly installed on my pc

Then i came back to Qt creator but the problem is the same, with the same answer (The problem is " xCode not set up properly . You may need to confirm the license agreement by running /usr/bin/xcodebuild.)

At least i’ve tried to insert /usr/bin/xcodebuild on the terminal, and the answer was

Maybe i can try to uninstall xCode and then install it again?

It looks like your Xcode install is garbled. If I search the web for the last error message you got “xcode-select: error tool ‘xcodebuild’ requires Xcode, but active developer directory ‘/Library/Developer/CommandLineTools’ is a command line tools instance” I get suggestions to either:

  1. run this command:

     sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
  2. or (it that does not fix it) reinstall Xcode from the Mac App Store.

Let me know if the 1st one works for you.

I’ve tryed to run the command :
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
And this is the answer:

So I’ve to uninstall xcode and reinstall it from the Mac App Store?

So it seems you have no Xcode at all ! On the other hand you could compile & link: so you must have the compiler command line tools … now I’m really curious:

  • are you on OS X Mavericks (10.9) and downloaded Xcode from https://developer.apple.com/ ? but then which package you downloaded ?
  • or are you on OS X Yosemite (10.10) or El Capitan (10.11) and installed Xcode directly from the Mac App Store ? And then which app you installed ?

I’m on OS X Yosemite , the Xcode which i have on my pc is Xcode-beta.app

Please uninstall the Xcode beta you got from https://developer.apple.com/xcode/download/ and reinstall the right Xcode for OS X Yosemite from the Mac App Store. We have added a note on the http://libpf.com/docs/tutorials/sdk_setup_osx.html that beta versions of Xcode are not supported.

Now it seems work

Right? Finally!
Which is the next step now?