U_D
U_D

Reputation: 741

Undefined symbols for architecture armv7 after adding .a file

I'm trying to build a small app using a *.a, *.h file I received from a certain vendor. this is the first time I'm adding external files to a project.

I added the files and I am getting these errors.

Undefined symbols for architecture armv7:

"_vDSP_fft_zropD", referenced from: _fft_hr_estimation in libmyTrekSDK_armv7.a(hr_calc.o) "_vDSP_vclrD", referenced from: _fft_hr_estimation in libmyTrekSDK_armv7.a(hr_calc.o) "_vDSP_vdbconD", referenced from: _fft_hr_estimation in libmyTrekSDK_armv7.a(hr_calc.o) "_vDSP_vmulD", referenced from: _fft_hr_estimation in libmyTrekSDK_armv7.a(hr_calc.o) "_vDSP_hamm_windowD", referenced from: _fft_hr_init in libmyTrekSDK_armv7.a(hr_calc.o) "_vDSP_zaspecD", referenced from: _fft_hr_estimation in libmyTrekSDK_armv7.a(hr_calc.o) "_OBJC_CLASS_$_EAAccessoryManager", referenced from: objc-class-ref in libmyTrekSDK_armv7.a(hrMonitor.o) "_EAAccessoryDidDisconnectNotification", referenced from: -[HRMonitor startup] in libmyTrekSDK_armv7.a(hrMonitor.o) "_vDSP_create_fftsetupD", referenced from: _fft_hr_init in libmyTrekSDK_armv7.a(hr_calc.o) "_EAAccessoryDidConnectNotification", referenced from: -[HRMonitor startup] in libmyTrekSDK_armv7.a(hrMonitor.o) "_OBJC_CLASS_$_EASession", referenced from: objc-class-ref in libmyTrekSDK_armv7.a(hrMonitor.o) "_vDSP_ctozD", referenced from: _fft_hr_estimation in libmyTrekSDK_armv7.a(hr_calc.o) "_vDSP_maxmgvD", referenced from: _fft_hr_estimation in libmyTrekSDK_armv7.a(hr_calc.o) "_vDSP_destroy_fftsetupD", referenced from: _fft_hr_free in libmyTrekSDK_armv7.a(hr_calc.o) ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

So far I've tried: (mentioned in other posts)

  1. I've made sure the the *.a file is included in the Link Binary With Library .
  2. Tried to change C++ Language Dialect and C++ Standard Library to Compiler Default.

More info:

  1. The files are in the project folder.
  2. I'm using an iPhone 4S v.6.1.3 and the project's deployment target is iOS 6.1.

Upvotes: 3

Views: 2566

Answers (2)

user3666078
user3666078

Reputation: 91

Just for future I got the "_OBJC_CLASS_$_EASession", referenced from: error. It was fixed by adding ExternalAccessory.framework to Targets > myApp > Build Phases > Link Binary with Libraries

Upvotes: 3

DivineDesert
DivineDesert

Reputation: 6954

  1. Check lib path is correct in framework search path / library search path
  2. check other linker flags needed for your lib source

Please refer this Answer for more details

Upvotes: 1

Related Questions