Monday 15 March 2010

Swift and objective-c name clash when using core graphics -



Swift and objective-c name clash when using core graphics -

with xcode 6.1 i'm getting error.

/...-bridging-header.h:5:2: note: in module 'coregraphics' imported /...-bridging-header.h:5: @import coregraphics; ^

/applications/xcode.app/contents/developer/platforms/iphonesimulator.platform/developer/sdks/iphonesimulator8.1.sdk/system/library/frameworks/coregraphics.framework/headers/cggeometry.h:271:1: error: definition same mangled name definition cgpointmake(cgfloat x, cgfloat y)

it occurs when phone call cgpointmake swift class swift class using objective-c class imported in bridging header imports core graphics.

i've cleared module cache , derived info , restarted measure. if isn't error in module cache , core graphics functions defined in 2 places don't know quite how address apart "just don't utilize objective-c file" i've done in mean time work around :/

don't utilize cgpointmake in swift:

let point = cgpoint(x: 123, y: 456)

objective-c swift xcode6.1

No comments:

Post a Comment