This is a migrated thread and some comments may be shown as answers.

Linker flags

2 Answers 76 Views
Apple iOS
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Juan
Top achievements
Rank 1
Juan asked on 04 Dec 2013, 01:33 AM
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 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 04 Dec 2013, 03:11 PM
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.
0
Accepted
Emil
Telerik team
answered on 04 Dec 2013, 06:38 PM
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.
Tags
Apple iOS
Asked by
Juan
Top achievements
Rank 1
Answers by
Steve
Telerik team
Emil
Telerik team
Share this question
or