• 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
C file in Xcode C++ project
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

C file in Xcode C++ project


  • Subject: C file in Xcode C++ project
  • From: Michael McLaughlin <email@hidden>
  • Date: Wed, 21 Nov 2007 10:37:28 -0500
  • Thread-topic: C file in Xcode C++ project

I have a C source file, originally .c, which I want to include in a C++ app
project. It has the usual
extern "C" {
stuff.

I started with the Xcode C++ app stationery which builds and runs OK.

If I include the filename.c file as such in the project, I get 198 errors in
Apple C++ headers that I do not without it.  I get these errors even if
filename.c is totally empty!

If I change filename.c to filename.cp, then the original errors go away but
I get 55 new errors, beginning with an Altivec declaration

vector unsigned int s;

The error in this case is

ISO C++ forbids declaration of 'vector' with no type

The problem is not missing headers because filename.c is OK in a C project.
It looks like this initial ISO error spawned the rest.  Obviously, I am
missing some essential point.

Any tips?

--
Mike McLaughlin

 _______________________________________________
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: C file in Xcode C++ project
      • From: Alastair Houghton <email@hidden>
  • Prev by Date: Re: "Best" ways to install frameworks?
  • Next by Date: C file in Xcode C++ project -- Addendum
  • Previous by thread: Re: "Best" ways to install frameworks?
  • Next by thread: Re: C file in Xcode C++ project
  • Index(es):
    • Date
    • Thread