Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to see invocation in Xcode

Tags:

objective-c

I'have got an error in build. Xcode return

Undefined symbols for architecture i386:
  "_main", referenced from:
      start in crt1.10.6.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Do you know how can i launch build with -v to see invocation ?

like image 661
Alexandre Ouicher Avatar asked Mar 21 '12 09:03

Alexandre Ouicher


2 Answers

In Xcode click on 'View', 'Navigators' and 'Show Report Navigator' then click on the build that failed. In the listing of the build steps you will see your 'use -v to see invocation' - to the right click on the disclosure icon (next to the error icon).

Screenshot indicating where to clickDoing that will show the details of the linker invocation.

Of course, the actual problem is that you are building an executable without including the file that contains 'main'. Usually one is created for you and automatically included - based on the target. If you are making a target yourself; you'll need main() implemented somewhere.

like image 134
GoZoner Avatar answered Sep 20 '22 15:09

GoZoner


You can add the -v to the "Other Linker Flags" field in the project settings. Doing so in a test project here yields the complete linker invocation:

complete linker invocation

complete linker invocation

when you add -v to "Other Linker Flags" you will get more information, this is the different between add before and add behind

like image 26
jack Avatar answered Sep 22 '22 15:09

jack