New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems calling PMKManifold from Objective-C++ #712

Closed
mmahkamov opened this Issue Sep 14, 2017 · 4 comments

Comments

3 participants
@mmahkamov

mmahkamov commented Sep 14, 2017

  • PromiseKit version: 4.4
  • Xcode version: 9.0
  • CocoaPods version: 1.3.1

I have a Objective-C++ module (along with Objective-C and Swift) in my project which uses PromiseKit. If PMKManifold is called in this module, it results in a linker error:

Undefined symbols for architecture x86_64:
"__PMKArrayWithCount(unsigned long, ...)", referenced from:

That was easily fixed by importing PromiseKit in the .pch file this way:

#if __cplusplus
extern "C" {
#endif
    
#import <PromiseKit/PromiseKit.h>
    
#if __cplusplus
}   // Extern C
#endif

Unfortunately, after upgrading to Xcode 9 the compiler fails miserably with very strange errors when generating Objective C headers from PromiseKit's Swift modules.

Now I have only the option to patch AnyPromise.h in order to fix the build:

#if __cplusplus
extern "C" {
#endif
    
extern id __nonnull __PMKArrayWithCount(NSUInteger, ...);

#if __cplusplus
}   // Extern C
#endif

Would it be possible to include this change or would that break some compatibility with existing code?

@mmahkamov mmahkamov changed the title from Problems calling PMKManifold from Objective C++ to Problems calling PMKManifold from Objective-C++ Sep 14, 2017

@mxcl mxcl closed this in 0c49056 Sep 14, 2017

@mxcl

This comment has been minimized.

Show comment
Hide comment
@mxcl

mxcl Sep 14, 2017

Owner

I will push the new Pod this evening.

Until then you can use this tag thus:

pod 'PromiseKit', :git => 'https://github.com/mxcl/PromiseKit.git', :tag => '4.4.1'
Owner

mxcl commented Sep 14, 2017

I will push the new Pod this evening.

Until then you can use this tag thus:

pod 'PromiseKit', :git => 'https://github.com/mxcl/PromiseKit.git', :tag => '4.4.1'
@chkpnt

This comment has been minimized.

Show comment
Hide comment
@chkpnt

chkpnt Oct 12, 2017

Unfortunately, version 4.4.1 is still not available via CocoaPods.

chkpnt commented Oct 12, 2017

Unfortunately, version 4.4.1 is still not available via CocoaPods.

@mxcl

This comment has been minimized.

Show comment
Hide comment
@mxcl

mxcl Oct 13, 2017

Owner

Please forgive me, pushing to CocoaPods takes an hour, during which time my computer is out of action due to the 100% CPU usage required. Every time I do the push it fails. I have wasted tens of hours on this.

For now use the above work around is completely identical to the eventual push.

Owner

mxcl commented Oct 13, 2017

Please forgive me, pushing to CocoaPods takes an hour, during which time my computer is out of action due to the 100% CPU usage required. Every time I do the push it fails. I have wasted tens of hours on this.

For now use the above work around is completely identical to the eventual push.

@mxcl

This comment has been minimized.

Show comment
Hide comment
@mxcl

mxcl Oct 13, 2017

Owner

K done.

Owner

mxcl commented Oct 13, 2017

K done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment