Bug 7744 - xcode 4.5 build problems
Summary: xcode 4.5 build problems
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: 6.0.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2012-10-09 12:10 UTC by dzervou
Modified: 2012-10-09 13:26 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description dzervou 2012-10-09 12:10:08 UTC
I'm new at this and I need some help. These are my version infos:
	Mono 2.10.9 (tarball)
	GTK 2.24.10
	GTK# (
	Package version: 210090011
Apple Developer Tools:
	 Xcode 4.5.1 (1842)
	 Build 4G1004
Monotouch: 6.0.2 (Evaluation)

I have a monotouch solution that I would like to be able to build successfully in Xcode.  I'm continuously getting the following error (2times):

Apple Mach-O Linker Error "_main", referenced from:


Ld DerivedData/ButtonEventDemo/Build/Products/MonoTouch-iphonesimulator/ButtonEventDemo.app/ButtonEventDemo normal i386
    cd /Users/dzervou/Desktop/documentation/xamarin-monotouch-samples-210382c/ButtonEventDemo/obj/Xcode/1
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Applications/MonoDevelop.app:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk -L/Users/dzervou/Desktop/documentation/xamarin-monotouch-samples-210382c/ButtonEventDemo/obj/Xcode/1/DerivedData/ButtonEventDemo/Build/Products/MonoTouch-iphonesimulator -F/Users/dzervou/Desktop/documentation/xamarin-monotouch-samples-210382c/ButtonEventDemo/obj/Xcode/1/DerivedData/ButtonEventDemo/Build/Products/MonoTouch-iphonesimulator -filelist /Users/dzervou/Desktop/documentation/xamarin-monotouch-samples-210382c/ButtonEventDemo/obj/Xcode/1/DerivedData/ButtonEventDemo/Build/Intermediates/ButtonEventDemo.build/MonoTouch-iphonesimulator/ButtonEventDemo.build/Objects-normal/i386/ButtonEventDemo.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=6.0 -framework UIKit -framework MapKit -framework Foundation -framework CoreGraphics -o /Users/dzervou/Desktop/documentation/xamarin-monotouch-samples-210382c/ButtonEventDemo/obj/Xcode/1/DerivedData/ButtonEventDemo/Build/Products/MonoTouch-iphonesimulator/ButtonEventDemo.app/ButtonEventDemo

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

"_main", referenced from: 
Start in crt1.o
Symbol(s) not found for architecture i386.

I noticed that creating a project in xcode I was able to build it.  

Could someone please point me to the right direction?

Thanks for your time
Comment 1 Sebastien Pouliot 2012-10-09 13:26:42 UTC
You do not build from Xcode, you build from MonoDevelop.

The only part of Xcode being used is the Interface Builder. You can create your UI using this tool (or using code) and then save it.  You then switch back to MonoDevelop to compile verything into a native application.