• 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
SCNd32 and friends in <inttypes.h>
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SCNd32 and friends in <inttypes.h>


  • Subject: SCNd32 and friends in <inttypes.h>
  • From: Steve Mills <email@hidden>
  • Date: Mon, 12 Nov 2012 11:55:01 -0600

I'm confused about this stuff. Currently we need to build 32-bit using the 10.6 sdk and 64-bit using the 10.7 or 10.8 sdk. When building 64-bit with 10.7 sdk, using SCNd32 does the correct thing when the variable is SInt32, because SCNd32 expands to "d". But when building 32-bit with 10.6 sdk, SCNd32 should expand to "ld", not "d".

SInt32		i32;

sscanf(s, "%"SCNd32, &i32);

-->Format specifies type 'int *' but the argument has type 'TimeEdu32 *' (aka 'long *')

Also, it seems the bulk of inttypes.h is compiled out when compiling C++. Why is this? I defined __STDC_FORMAT_MACROS before inttypes.h gets included, which says will force it to be used (at least this is in the 10.6 sdk version of the file, but not in the 10.8 sdk version). But inttypes.h doesn't even have any conditionals which would cause it to use different formatters depending on the architecture being used, so I'm confused about how this would work on anything but 64-bit.

--
Steve Mills
office: 952-818-3871
home: 952-401-6255
cell: 612-803-6157



 _______________________________________________
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

  • Prev by Date: Re: Using Xcode's target=>info=>Document Types panel
  • Next by Date: App give s -35 error when run out of the debugger
  • Previous by thread: Re: IB Deployment
  • Next by thread: App give s -35 error when run out of the debugger
  • Index(es):
    • Date
    • Thread