• 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
Re: C++ linkage errors in XCode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C++ linkage errors in XCode


  • Subject: Re: C++ linkage errors in XCode
  • From: Andreas Grosam <email@hidden>
  • Date: Wed, 8 Dec 2010 13:44:34 +0100

On Dec 8, 2010, at 1:25 PM, Vijayakumar_Thota wrote:

> Dear List,
>
> Facing the below issue in compiling the project:
>
> I am developing an application, which is using the third party library.  The third party library is an Objective-C++ code. When I try to compile my code, its giving the following errors:
>
> "iostream: No such file or directory
> string: No such file or directory
> vector: No such file or directory"
>
> Which are c++ linkage errors.

These are not linkage errors. The compiler (or more precisely, the preprocessor) emits these errors when it can't find header files with that names. These header files are part of the standard C++ library.

In order to fix this issue, please ensure in cases where you directly or indirectly include C++ header files or Objective-C++ header files in your source file, that this file is an Objective-C++ source file - which you get automatically by specifying the extension as .mm (instead of .m for Objective-C).  You can do this within Xcode just by renaming the file extension.

When Xcode compiles Objective-C++ source files, the path to the standard C++ header files (and lib paths etc.) are automatically set.


Regards,
Andreas

>
> I have given the library search paths "/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/usr/include/c++/4.2.1/iosfwd". But still the issue is not resolved.
>
> Please let me know if anybody else faced the similar issue.
>
> -
> Thanks & Regards,
> VIJAY KUMAR THOTA
> Ext: 6238

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: C++ linkage errors in XCode
      • From: Vijayakumar_Thota <email@hidden>
References: 
 >C++ linkage errors in XCode (From: Vijayakumar_Thota <email@hidden>)

  • Prev by Date: Re: performSelectorOnMainThread fails second time through
  • Next by Date: Re: C++ linkage errors in XCode
  • Previous by thread: C++ linkage errors in XCode
  • Next by thread: Re: C++ linkage errors in XCode
  • Index(es):
    • Date
    • Thread