Highlighted

iOS native extension build fails on "Undefined symbols for architecture arm64"

Community Beginner ,
Oct 21, 2015

Copy link to clipboard

Copied

Hi!

At ipa compile time I get the following error:

Undefined symbols for architecture arm64:
"__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_", referenced from:
__ZN2cv9Exception13formatMessageEv in libopencv_core.a(system.o)
"__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm", referenced from:
__Z20best_line_for_sampleP9_IplImageh in libCardIO.a(dmz_all.o)
__ZL18llcv_equalize_histPK9_IplImagePS_ in libCardIO.a(dmz_all.o)
__ZNK2cv3Mat6copyToERKNS_12_OutputArrayE in libopencv_core.a(copy.o)
__ZNK2cv3Mat6copyToERKNS_12_OutputArrayERKNS_11_InputArrayE in libopencv_core.a(copy.o)
__ZN2cv3Mat5setToERKNS_11_InputArrayES3_ in libopencv_core.a(copy.o)
__ZN2cv6repeatERKNS_11_InputArrayEiiRKNS_12_OutputArrayE in libopencv_core.a(copy.o)
_cvCopy in libopencv_core.a(copy.o)

This ane use iOS SDK from card-io/card.io-iOS-SDK · GitHub

with openCV libraries inside

For ane build I use AIR 19 with next setup files:

<extension xmlns="http://ns.adobe.com/air/extension/19.0">

    <id>ane.cardScan</id>

    <versionNumber>0.0.1</versionNumber>

    <platforms>

        <platform name="Android-ARM">

            <applicationDeployment>

                <nativeLibrary>lib.jar</nativeLibrary>

                <initializer>ane.cardScan.ScanExtension</initializer>

            </applicationDeployment>

        </platform>

      

        <platform name="Android-x86">

            <applicationDeployment>

                <nativeLibrary>lib.jar</nativeLibrary>

                <initializer>ane.cardScan.ScanExtension</initializer>

            </applicationDeployment>

        </platform>

      

        <platform name="iPhone-ARM">

            <applicationDeployment>

                <nativeLibrary>libScanExtension.a</nativeLibrary>

                <initializer>QRSBHExtInitializer</initializer>

            </applicationDeployment>

        </platform>

      

         <platform name="default">

            <applicationDeployment/>

        </platform>

      

    </platforms>

</extension>

<platform xmlns="http://ns.adobe.com/air/extension/19.0">

    <sdkVersion>6.1.0</sdkVersion>

    <linkerOptions>

        <option>-ios_version_min 6.1</option>

        <option>-framework AudioToolbox</option>

        <option>-framework AVFoundation</option>

        <option>-framework CoreGraphics</option>

        <option>-framework CoreMedia</option>

        <option>-framework CoreVideo</option>

        <option>-framework Foundation</option>

        <option>-framework MobileCoreServices</option>

        <option>-framework OpenGLES</option>

        <option>-framework QuartzCore</option>

        <option>-framework Security</option>

        <option>-framework UIKit</option>

        <option>-ObjC</option>

    </linkerOptions>

    <packagedDependencies>

        <packagedDependency>libs/libCardIO.a</packagedDependency>

        <packagedDependency>libs/libopencv_core.a</packagedDependency>

        <packagedDependency>libs/libopencv_imgproc.a</packagedDependency>

    </packagedDependencies>

</platform>

All libraries exist, ane builds with no errors with arm64 and armv7 architectures.

Use XCode 7.1, InteliJ IDEA 14.1.5, latest AIR 19 SDK

Here you can find ane with all souce files

https://dl.dropboxusercontent.com/u/8595124/scanCardExtension.zip

Does anyone have any advice or have experienced issues with openCV library before?

Thanks

TOPICS
Development

Views

596

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

iOS native extension build fails on "Undefined symbols for architecture arm64"

Community Beginner ,
Oct 21, 2015

Copy link to clipboard

Copied

Hi!

At ipa compile time I get the following error:

Undefined symbols for architecture arm64:
"__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_", referenced from:
__ZN2cv9Exception13formatMessageEv in libopencv_core.a(system.o)
"__ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initEPKcm", referenced from:
__Z20best_line_for_sampleP9_IplImageh in libCardIO.a(dmz_all.o)
__ZL18llcv_equalize_histPK9_IplImagePS_ in libCardIO.a(dmz_all.o)
__ZNK2cv3Mat6copyToERKNS_12_OutputArrayE in libopencv_core.a(copy.o)
__ZNK2cv3Mat6copyToERKNS_12_OutputArrayERKNS_11_InputArrayE in libopencv_core.a(copy.o)
__ZN2cv3Mat5setToERKNS_11_InputArrayES3_ in libopencv_core.a(copy.o)
__ZN2cv6repeatERKNS_11_InputArrayEiiRKNS_12_OutputArrayE in libopencv_core.a(copy.o)
_cvCopy in libopencv_core.a(copy.o)

This ane use iOS SDK from card-io/card.io-iOS-SDK · GitHub

with openCV libraries inside

For ane build I use AIR 19 with next setup files:

<extension xmlns="http://ns.adobe.com/air/extension/19.0">

    <id>ane.cardScan</id>

    <versionNumber>0.0.1</versionNumber>

    <platforms>

        <platform name="Android-ARM">

            <applicationDeployment>

                <nativeLibrary>lib.jar</nativeLibrary>

                <initializer>ane.cardScan.ScanExtension</initializer>

            </applicationDeployment>

        </platform>

      

        <platform name="Android-x86">

            <applicationDeployment>

                <nativeLibrary>lib.jar</nativeLibrary>

                <initializer>ane.cardScan.ScanExtension</initializer>

            </applicationDeployment>

        </platform>

      

        <platform name="iPhone-ARM">

            <applicationDeployment>

                <nativeLibrary>libScanExtension.a</nativeLibrary>

                <initializer>QRSBHExtInitializer</initializer>

            </applicationDeployment>

        </platform>

      

         <platform name="default">

            <applicationDeployment/>

        </platform>

      

    </platforms>

</extension>

<platform xmlns="http://ns.adobe.com/air/extension/19.0">

    <sdkVersion>6.1.0</sdkVersion>

    <linkerOptions>

        <option>-ios_version_min 6.1</option>

        <option>-framework AudioToolbox</option>

        <option>-framework AVFoundation</option>

        <option>-framework CoreGraphics</option>

        <option>-framework CoreMedia</option>

        <option>-framework CoreVideo</option>

        <option>-framework Foundation</option>

        <option>-framework MobileCoreServices</option>

        <option>-framework OpenGLES</option>

        <option>-framework QuartzCore</option>

        <option>-framework Security</option>

        <option>-framework UIKit</option>

        <option>-ObjC</option>

    </linkerOptions>

    <packagedDependencies>

        <packagedDependency>libs/libCardIO.a</packagedDependency>

        <packagedDependency>libs/libopencv_core.a</packagedDependency>

        <packagedDependency>libs/libopencv_imgproc.a</packagedDependency>

    </packagedDependencies>

</platform>

All libraries exist, ane builds with no errors with arm64 and armv7 architectures.

Use XCode 7.1, InteliJ IDEA 14.1.5, latest AIR 19 SDK

Here you can find ane with all souce files

https://dl.dropboxusercontent.com/u/8595124/scanCardExtension.zip

Does anyone have any advice or have experienced issues with openCV library before?

Thanks

TOPICS
Development

Views

597

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 21, 2015 0
Community Beginner ,
Oct 21, 2015

Copy link to clipboard

Copied

If I add next line to platform.xml

<option>-lc++</option>

like discribed in Using OpenCV inside an Adobe Native Extension for IOS

bring new error

Failed to package AIR application Main.ipa:

         duplicate symbol l003 in:

         C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\4e85cfbf-c83c-497b-9225-87eec175de64\\libs/libCardIO.a(CardIOTableViewCell.o)

         C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\4e85cfbf-c83c-497b-9225-87eec175de64\\libs/libCardIO.a(CardIOCardOverlay.o)

         duplicate symbol l004 in:

         C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\4e85cfbf-c83c-497b-9225-87eec175de64\\libs/libCardIO.a(CardIOTableViewCell.o)

         C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\4e85cfbf-c83c-497b-9225-87eec175de64\\libs/libCardIO.a(CardIOCardOverlay.o)

         duplicate symbol l003 in:

         C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\4e85cfbf-c83c-497b-9225-87eec175de64\\libs/libCardIO.a(CardIOTableViewCell.o)

         C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\4e85cfbf-c83c-497b-9225-87eec175de64\\libs/libCardIO.a(CardIOResource.o)

         ld: 101 duplicate symbols for architecture arm64

         Compilation failed while executing : ld64

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 21, 2015 0