Re: C++ linkage errors in XCode
Re: C++ linkage errors in XCode
- Subject: Re: C++ linkage errors in XCode
- From: Vijayakumar_Thota <email@hidden>
- Date: Wed, 8 Dec 2010 18:57:10 +0530
- Acceptlanguage: en-US
- Thread-topic: C++ linkage errors in XCode
Thanks Andreas. When I have changed the file extension to .mm, those errors are resolved.
Regards,
Vijay kumar thota
On 12/8/10 6:14 PM, "Andreas Grosam" <email@hidden> wrote:
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
-
Thanks & Regards,
VIJAY KUMAR THOTA
Ext: 6238
________________________________
DISCLAIMER:
This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated.
_______________________________________________
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