Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
489 views
in Technique[技术] by (71.8m points)

apache flex - Error when including OpenCv framework in a Native Extension for IOS

I'm creating an ANE for IOS that implements the OpenCV framework, but when I compile the app on Flash Builder I get this error:

Error occurred while packaging the application:

Undefined symbols for architecture armv7:
  "__ZNKSt3__120__vector_base_commonILb1EE20__throw_length_errorEv", referenced from:
      __ZNSt3__16vectorIN2cv3VecIiLi128EEENS_9allocatorIS3_EEE8__appendEm in opencv2(matrix.o)
      __ZNSt3__16vectorIN2cv3VecIiLi64EEENS_9allocatorIS3_EEE8__appendEm in opencv2(matrix.o)
      __ZNSt3__16vectorIN2cv3VecIiLi32EEENS_9allocatorIS3_EEE8__appendEm in opencv2(matrix.o)
      __ZNSt3__16vectorIN2cv3VecIiLi16EEENS_9allocatorIS3_EEE8__appendEm in opencv2(matrix.o)
      __ZNSt3__16vectorIN2cv3VecIiLi12EEENS_9allocatorIS3_EEE8__appendEm in opencv2(matrix.o)
      __ZNSt3__16vectorIN2cv3VecIiLi9EEENS_9allocatorIS3_EEE8__appendEm in opencv2(matrix.o)
      __ZNSt3__16vectorIN2cv3VecIiLi8EEENS_9allocatorIS3_EEE8__appendEm in opencv2(matrix.o)
      ...
ld: symbol(s) not found for architecture armv7
Compilation failed while executing : ld64

The error occurred after I added this line

<option>-framework opencv2</option>

to the linkerOption on the platformOptions.xml

Any idea?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Problem solved. I've added this line

<option>-lc++</option>

to the platformOptions.xml.

Now OpenCV works great in my actionscript native extension.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...