How to see a call in Xcode

I had a build error. Return Xcode

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 I can run build with -v to see the call?

+6
source share
2 answers

In Xcode, click View, Navigators, and Show Report Navigator, then click on the assembly that failed. In the list of build steps, you will see that β€œuse -v to view the call” - right-click the expansion icon (next to the error icon).

Screenshot showing where to click As a result, the linker call details will be shown.

Of course, the problem is that you are creating an executable file without including a file containing "main". Usually it is created for you and automatically turns on - based on the goal. If you yourself make a goal; you will need main ().

+3
source

You can add -v to the "Other linker flags" field in the project settings. Doing this in a test project gives a complete linker call:

complete linker invocation

complete linker invocation

when you add -v to "Other linker flags", you will get more information, these are different between adding and adding for

+1
source

Source: https://habr.com/ru/post/911279/


All Articles