0

I have a weird thing when I try to compile with xcodebuild. If I open the project on the mac with XCode, the code compile without any warning.

If I use the following command line : xcodebuild -configuration Debug -target myApp PROVISIONING_PROFILE=B5AD0E27-B224-4962-B0DC-XXXXXXXX

I have some compilation error : /Users/myUser/.jenkins/jobs/myApp/workspace/prj/Controllers/DeclarerEtape1Adresse.m:75:6: error: receiver type 'DeclarerEtape1Adresse' for instance message does not declare a method with selector 'rechercheAdresse' [4] [self rechercheAdresse]; ^ 1 error generated.

This errors can appear in external code (taken from github). It seems that the compilator is much strict in command line mode than with Xcode.

Is there any specific configuration in command line ?

Thank you for your feedback.

SlumTheSlug
  • 115
  • 13
  • The underlying compiler should be the same, regardless of using the IDE or xcodebuild. However, it's possible you are using a different tool-chain: 'which xcodebuild' or xcodeselect might help check if the Xcode.app you're using corresponds to the toolchain used by xcodebuild. – James Turner Jun 20 '12 at 16:48
  • Thank you for your answer. The command 'which xcodebuild' returns /usr/bin/xcodebuild in both environment – SlumTheSlug Jun 21 '12 at 07:49
  • check your `export` for me `unset CPATH` worked – ale_stro Oct 10 '19 at 11:53

1 Answers1

0

James, you're the boss :p I tried xcodebuild -version on both environment and the ci server used an old SDK 4.2.X. So I used the sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer and it fixes the issue

SlumTheSlug
  • 115
  • 13