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 ?
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).
Doing 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.
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:
when you add -v to "Other Linker Flags" you will get more information, this is the different between add before and add behind
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With