0

When I add OpenCV to the project, it happens "Undefined symbols for architecture armv7".

It won't compile even when I remove all the OpenCV Code.

OpenGL can work well before adding Opencv.

I have read THIS QUESTION but it didn't work for me. Any one knows this?

    Undefined symbols for architecture armv7:
  "opengl_texture_destroy(ARDroneOpenGLTexture*)", referenced from:
      -[OpenGLSprite dealloc] in OpenGLSprite.o
  "opengl_texture_draw(ARDroneOpenGLTexture*, unsigned int)", referenced from:
      -[OpenGLSprite drawSelf] in OpenGLSprite.o
  "opengl_texture_init(ARDroneOpenGLTexture*)", referenced from:
      -[OpenGLSprite initWithFrame:withScaling:withProgram:withDrone:withDelegate:] in OpenGLSprite.o
  "opengl_texture_scale_compute(ARDroneOpenGLTexture*, ARDroneSize, ARDroneScaling)", referenced from:
      -[OpenGLSprite initWithFrame:withScaling:withProgram:withDrone:withDelegate:] in OpenGLSprite.o
      -[OpenGLSprite checkNewResolution] in OpenGLSprite.o
      -[OpenGLSprite setScaling:] in OpenGLSprite.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Community
  • 1
  • 1
alexqinbj
  • 1,091
  • 3
  • 13
  • 27
  • Similar problem http://stackoverflow.com/questions/6429494/undefined-symbols-for-architecture-armv7?rq=1 – Gihan May 21 '13 at 02:39
  • I have read this. But I still don't know how to fix it. I have add the lib frame and check the other two points. It works well first but failed even I remove all the changes... – alexqinbj May 21 '13 at 02:48
  • are you sure you have added al the classes to target properly. Most common reason is that. – Gihan May 21 '13 at 11:01
  • 1
    I found the reason, because when mix C function with ObjectC++, it should declare with "extern C" – alexqinbj May 22 '13 at 02:55
  • If you can put your solution as a answer here. Will be helpful to other people. – Gihan May 23 '13 at 09:48

0 Answers0