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

Re: No matching function for call to CFStringGetCString


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

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

I didn't post all of the relevant code: ref is a CFTypeRef; I needed
to cast it to CFStringRef.

Or maybe do this differently, as my code crashes now, but I expect I
can fix that.
Michael David Crawford, Baritone
email@hidden

      One Must Not Trifle With Wizards For It Makes Us Soggy And Hard To Light.


On Mon, Dec 12, 2016 at 11:25 AM, Michael David Crawford
<email@hidden> wrote:
> This is with Xcode 8.1 on macOS 10.12.1.
> Michael David Crawford, Baritone
> email@hidden
>
>       One Must Not Trifle With Wizards For It Makes Us Soggy And Hard To Light.
>
>
> On Mon, Dec 12, 2016 at 11:23 AM, Michael David Crawford
> <email@hidden> wrote:
>> 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


References: 
 >No matching function for call to CFStringGetCString (From: Michael David Crawford <email@hidden>)
 >Re: No matching function for call to CFStringGetCString (From: Michael David Crawford <email@hidden>)

  • Prev by Date: Re: No matching function for call to CFStringGetCString
  • Next by Date: Re: No matching function for call to CFStringGetCString
  • Previous by thread: Re: No matching function for call to CFStringGetCString
  • Next by thread: Re: No matching function for call to CFStringGetCString
  • Index(es):
    • Date
    • Thread