Linker flags

3 posts, 1 answers
  1. Juan
    Juan avatar
    3 posts
    Member since:
    Nov 2013

    Posted 03 Dec 2013 Link to this post

    I need to create a custom PhoneGap plugin (using Icenium) from a library (Card.IO, https://github.com/card-io/card.io-iOS-SDK ) and I need to include  -lc++ as a linker flag for it to work... Is there a way I can do this? Currently, my build fails with a lot of errors like this one: 

    Link: Undefined symbols for architecture armv7:
      "std::__1::__vector_base_common<true>::__throw_length_error() const", referenced from:
          std::__1::vector<unsigned char*, std::__1::allocator<unsigned char*> >::__append(unsigned long) in libCardIO.a(dmz_all.o)
          std::__1::vector<cv::Vec<int, 128>, std::__1::allocator<cv::Vec<int, 128> > >::__append(unsigned long) in libCardIO.a(matrix.o)
          std::__1::vector<cv::Vec<int, 64>, std::__1::allocator<cv::Vec<int, 64> > >::__append(unsigned long) in libCardIO.a(matrix.o)
          std::__1::vector<cv::Vec<int, 32>, std::__1::allocator<cv::Vec<int, 32> > >::__append(unsigned long) in libCardIO.a(matrix.o)
          std::__1::vector<cv::Vec<int, 16>, std::__1::allocator<cv::Vec<int, 16> > >::__append(unsigned long) in libCardIO.a(matrix.o)
          std::__1::vector<cv::Vec<int, 12>, std::__1::allocator<cv::Vec<int, 12> > >::__append(unsigned long) in libCardIO.a(matrix.o)
          std::__1::vector<cv::Vec<int, 9>, std::__1::allocator<cv::Vec<int, 9> > >::__append(unsigned long) in libCardIO.a(matrix.o)





  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 04 Dec 2013 Link to this post

    Hi Juan,

    Unfortunately there is no counterpart attribute for adding linker flags in Cordova/Plugman configuration files at this time.

    Regards,
    Steve
    Telerik
    You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.
    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
  3. Answer
    Emil
    Admin
    Emil avatar
    2 posts

    Posted 04 Dec 2013 Link to this post

    Hi Juan,
    After further investigation we have found a way to fix that issue.
    Here is the updated plugin.xml that you can use:
    <?xml version="1.0" encoding="UTF-8"?>
            id="com.custom.plugin.CardIO"
            version="1.0.0">
     
        <name>Card.IO</name>
     
       
        <!-- ios -->
        <platform name="ios">
          <framework src="libc++.dylib" />
          <asset src="www/CardIOPGPlugin.js" target="CardIOPGPlugin.js" />
            <config-file target="res/xml/config.xml" parent="widget">
                <feature name="CustomCordovaPlugin">
                    <param name="ios-package" value="com.custom.plugin.CardIO" />
                </feature>
            </config-file>
     
          <header-file src="src/ios/CardIOPGPlugin.h" />
          <source-file src="src/ios/CardIOPGPlugin.m" />
             
            <source-file src="src/ios/CardIO/libCardIO.a" framework="true" />
             
            <header-file src="src/ios/CardIO/CardIO.h"  />
            <header-file src="src/ios/CardIO/CardIOCreditCardInfo.h" />
            <header-file src="src/ios/CardIO/CardIOPaymentViewController.h" />
            <header-file src="src/ios/CardIO/CardIOPaymentViewControllerDelegate.h"/>
            <header-file src="src/ios/CardIO/CardIOView.h"  />
            <header-file src="src/ios/CardIO/CardIOViewDelegate.h"  />
     
            
     
        </platform>
    </plugin>



    Regards,
    Emil
    Telerik
    You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.
    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
Back to Top