ScanApiHelper Error

137 Views Asked by At

I get the following error when trying to compile a project with the Socket Mobile Scan API for iOS. I have a feeling this is an issue with he project settings but I can't get rid of it after changing settings. Any thoughts?

"_OBJC_CLASS_$_ScanApiHelper", referenced from: objc-class-ref in xxxx.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
1

There are 1 best solutions below

0
On

I got the same error when initially implementing this driver.

I don't know if this is your issue or not, but my issue was self-inflicted.

The "ScanApiHelper" was written as C++ (mm) and I had some some code in my PCH file that was redefining NSLog to utilize a custom logger. My customer logger however was not property declared. It was only marked as extern as opposed to extern "c".

Had I used FOUNDATION_EXPORT instead of extern, I wouldn't have had an issue as it handles all of this for you.