[swift-users] Serious Issue with Project Preprocessor Build Setting, Xcode 7.3 and Swift.

Daniel Dunbar daniel_dunbar at apple.com
Thu Mar 24 10:40:57 CDT 2016


> On Mar 24, 2016, at 5:21 AM, James Campbell <james at supmenow.com> wrote:
> 
> This is the "GCC_PREPROCESSOR_DEFINITIONS" build setting. This previously imported into swift. But in Xcode 7.3 it no longer does this.

Ok, and exactly how are you trying to use them? Via an #if in C or via an #if in Swift?

 - Daniel

> 
> If I write the Macros in the bridging header they are imported but I would ideally like to keep them in a build setting.
> 
> ___________________________________
> 
> James⎥Head Of CEO
> 
> james at supmenow.com <mailto:james at supmenow.com>⎥supmenow.com <http://supmenow.com/>
> Sup
> 
> Runway East
> 
> 
> 10 Finsbury Square
> 
> London
> 
> 
> EC2A 1AF 
> 
> 
> On Wed, Mar 23, 2016 at 11:23 PM, Daniel Dunbar <daniel_dunbar at apple.com <mailto:daniel_dunbar at apple.com>> wrote:
> To follow on to what Joe said, can you provide more info about the exact problem. Is this a C preprocessor definition that you expect to be available in code imported by the Clang importer (i.e., bridging header files, etc.), or is a a macro you are expecting to use within Swift itself? And please let us know exactly which build setting you are referring to.
> 
> Thanks,
>  - Daniel
> 
> > On Mar 23, 2016, at 3:59 PM, Joe Groff via swift-users <swift-users at swift.org <mailto:swift-users at swift.org>> wrote:
> >
> >
> >> On Mar 23, 2016, at 9:43 AM, James Campbell via swift-users <swift-users at swift.org <mailto:swift-users at swift.org>> wrote:
> >>
> >> We are experiencing an issue when compiling swift code under Xcode 7.3.
> >>
> >> Preprocessor macros specified in the Xcode Project aren't imported into swift. Ones manually declared in code are imported fine.
> >>
> >> Specifying Xcode 7.3 to use the Xcode 7.2 toolchain (Swift 2.1 etc) has no effect on this.
> >>
> >> This is preventing us from using Xcode 7.3 and being able to test for 9.3. Anybody else getting this issue?
> >
> > The Swift and C family build settings in Xcode are distinct. Are you sure you set the -D flags in "Other Swift Flags" and not in the C build settings? Swift doesn't have preprocessor macros.
> >
> > -Joe
> >
> > _______________________________________________
> > swift-users mailing list
> > swift-users at swift.org <mailto:swift-users at swift.org>
> > https://lists.swift.org/mailman/listinfo/swift-users <https://lists.swift.org/mailman/listinfo/swift-users>
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160324/8abedc3c/attachment.html>


More information about the swift-users mailing list