• 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
No matching function for call to CFStringGetCString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

No matching function for call to CFStringGetCString


  • Subject: No matching function for call to CFStringGetCString
  • From: Michael David Crawford <email@hidden>
  • Date: Mon, 12 Dec 2016 11:23:50 -0800

I'm trying to convert a CFStringRef to a C string so I can print it to
the terminal for debugging:

    char catStr[ 256 ];
    CFStringGetCString( ref, catStr, 256, kCFStringEncodingMacRoman );

I get "No matching function for call to CFStringGetCString" and
similarly for CFStringGetCStringPtr;

Both are declared in CFString.h.  I've got;

    #include <CoreFoundation/CoreFoundation.h>
    #include <CoreFoundation/CFString.h>.  // Just to be sure

How can either the compiler see the declaration, or if that's not
going to work, how can I convert my CFStringRef to a C string?

I Am Eternally In Your Debt,

Michael David Crawford, Baritone
email@hidden

      One Must Not Trifle With Wizards For It Makes Us Soggy And Hard To Light.
 _______________________________________________
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: No matching function for call to CFStringGetCString
      • From: Jens Alfke <email@hidden>
    • Re: No matching function for call to CFStringGetCString
      • From: Steve Christensen <email@hidden>
    • Re: No matching function for call to CFStringGetCString
      • From: Michael David Crawford <email@hidden>
  • Prev by Date: Re: Breakpoints - disable all?
  • Next by Date: Re: No matching function for call to CFStringGetCString
  • Previous by thread: Re: Breakpoints - disable all?
  • Next by thread: Re: No matching function for call to CFStringGetCString
  • Index(es):
    • Date
    • Thread