facebookarchive / pop

An extensible iOS and OS X animation library, useful for physics-based interactions.
Other
19.66k stars 2.88k forks source link

Pop Integration - Linker Failure #302

Closed vikram17000 closed 8 years ago

vikram17000 commented 8 years ago

Hi - this is probably not a bug per se but wanted to check if folks have encountered this issue before and any workarounds available? I'm integrating the Pop framework directly within a blank / new test project, but without using CocoaPods - unfortunately not a big fan of the same.

I copied all the files, changed the headers to remove the 'pop' directory in the import statements, adding -libc++ as an other linker flag - all compiles apart from one lingering "ld: library not found for -libc++ clang: error: linker command failed with exit code 1 (use -v to see invocation)" issue.

Anyone aware of how to work around this? Conscious the recommended way to integrate Pop is via CocoaPods but as mentioned above, I somehow can't appreciate the workspace dependency and find all the additional files that the pods bring as noise, so would first try and integrate directly if that is possible...

Many thanks!

grp commented 8 years ago

Xcode projects are an opaque, non-human-readable, so as with cases like this they're hard to debug. CocoaPods is a human-readable format that's much easier to maintain.

To debug issues like this, I'd suggest starting with the command line that's failing, and try modifying it to what should work. In this case, -lc++ is a valid flag (from -stdlib=libc++), but -libc++ doesn't seem valid to me — that might be your issue. Then, find what build setting or option in the Xcode project caused the command line to be generated in that way, and change it as appropriate.

vikram17000 commented 8 years ago

Thanks. I think I got the compilation / linking to work finally - somehow, when I was adding the Pop files to the project, the TransformationMatrix.cpp wasn't getting added as a compile source even when I was selecting the WebCore directory - strange as never happened in Xcode 6. Further though now, I haven't had to even include the -lc++ linker flag so far - expecting a few issues there when I start debugging...

Thanks for your inputs nevertheless.

Tremendous work on this framework and open-sourcing it!