Skip to main content
juhyeunh85870036
Participant
September 30, 2016
Answered

Native extension problem

  • September 30, 2016
  • 2 replies
  • 488 views

I am developing with ANE.

But I got this message "ArgumentError: Error #3500: The extension context does not have a method with the name ...".

I don't know which part is problem.

I am sharing my code - actionscript source, c source and related build script, project file (xcode, intelliJ..), etc..

GitHub - juhyeunize/Test-ANE: This repository is for discussion to solve some problems about ANE.

I would like if someone solve this problem.

This topic has been closed for replies.
Correct answer el111

Symlinks in the .framework file need to be stripped when you copy the file

line 31 of Test-ANE/run.sh at master · juhyeunize/Test-ANE · GitHub

should read

cp -R -L "./AIRNativeTest/build/Release/ANETest.framework" ./ANE/platform/mac

That's one thing I can see.

2 replies

juhyeunh85870036
Participant
October 7, 2016

I'm writing my solution for people have same problem.

I wanted to make a program with Adobe AIR to use OpenCV on Mac OSX.

So I should use AIR native extension and need XCode configuration to compile native C code.

I tried several ways to make it, and I succeeded finally.

1. Use static OpenCV library.

To deploy your application, you should use third party library as static.

By the way when you compile OpenCV library with static, turn off stuff related to OpenCL, IPP and test module.

2. When you copy your native framework to make an ane file, use "-L" option.

The original framework file (actually directory) includes several symlink files.

But it seems to have some problem when you execute native code in your AIR application. (like above situation)

3. Don't use -flat_namespace in linker flag.

I got an error related to 'flat namespace' on AIR application.

So I removed -flat_namespace flag on XCode build configuration and the error was disappeared.

I hope this experiences would be helpful for someone.

Thank you.

el111Correct answer
Legend
September 30, 2016

Symlinks in the .framework file need to be stripped when you copy the file

line 31 of Test-ANE/run.sh at master · juhyeunize/Test-ANE · GitHub

should read

cp -R -L "./AIRNativeTest/build/Release/ANETest.framework" ./ANE/platform/mac

That's one thing I can see.

juhyeunh85870036
Participant
October 7, 2016

You're right!!!

I got a success result.

Thank you!!