• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Force the usage of g++ instead of gcc
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Force the usage of g++ instead of gcc


  • Subject: Force the usage of g++ instead of gcc
  • From: Wanadoo Hartwig <email@hidden>
  • Date: Sat, 28 Aug 2010 11:49:29 +0200

How can I force Xcode to use g++ instead of gcc for linking?

Suppose I have the following constellation:

 - a C++ library called libC++ (this library makes use of the std C++ library)
 - an ObjC library called libObjC (this library makes use of libC++)
 - an application that only contains ".m" files but makes use of libObjC

So, the Xcode project of the application only contains ".m" files and the two static libraries libC++ and libObjC (and perhaps some frameworks). The problems is that Xcode assumes that linking using g++ is not necessary because the application's project only contains ".m" files. This is of course wrong because libC++ needs libstd++.
How can I force Xcode to link using g++?

Thanks!

Hartwig

PS: I used as a workaround to rename main.m to main.mm although this is not necessary.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Force the usage of g++ instead of gcc
      • From: "Sean McBride" <email@hidden>
  • Prev by Date: Re: opendiff tool slow to exit
  • Next by Date: why textFieldShouldBeginEditing is called twice in iOS4?
  • Previous by thread: Re: NS_FORMAT_FUNCTION broken on Xcode 3.2.3?
  • Next by thread: Re: Force the usage of g++ instead of gcc
  • Index(es):
    • Date
    • Thread