Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Errors #15

Closed
ddeakes opened this issue Jun 11, 2019 · 19 comments
Closed

Build Errors #15

ddeakes opened this issue Jun 11, 2019 · 19 comments

Comments

@ddeakes
Copy link

ddeakes commented Jun 11, 2019

When I try to build my iOS Cordova app after installing this plugin I now get the following error.

Any help would greatly be appreciated.

ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

xcodebuild: Command failed with exit code 65

@DigvijayJaswal
Copy link

Even i am facing the same issue

@arcadius
Copy link

@ddeakes and @DigvijayJaswal , please which command did you use to install the plugin?

Maybe you have pulled from the wrong branch?

Please make sure you use cordova plugin add https://github.com/MenelicSoftware/cordova-plugin-brother-label-printer --save

@ddeakes
Copy link
Author

ddeakes commented Jun 13, 2019

@arcadius Thanks for the reply, that however still gives the same error when trying to run:

cordova build ios --save

I get:

ld: symbol(s) not found for architecture x86_64
clang: error
: linker command failed with exit code 1 (use -v to see invocation)

@DigvijayJaswal
Copy link

@ddeakes i was able to make it work by adding libc inside Linked Libraries
Screenshot 2019-06-19 at 11 46 26 AM

@sanarm123
Copy link

duplicate symbol '_kDeviceType' in:
cordova-plugin-bxlbgatedevice/libMPosSDK.a(BxlDeviceObject.o)
BRPtouchPrinterKit.framework/BRPtouchPrinterKit(deviceSearchByBonjour.o)
ld: 1 duplicate symbol for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Not able to build, could you please help us resolve.

@robr2112
Copy link

robr2112 commented Jul 7, 2020

@sanarm123, Seems the problem here is that you are using 2 SDKs from different printer vendors and each SDK has the same duplicate symbol. One or the other SDK will likely have to change the name of the constant to avoid this problem. Can you provide your contact info and I will reach out to you outside of GitHub to discuss further.

@vanerleo
Copy link

vanerleo commented Sep 1, 2020

Getting the same error using IONIC : Undefined symbols for architecture x86_64:
whats the fix?

@robr2112
Copy link

robr2112 commented Sep 1, 2020

@vanerleo It seems from other answers above that the fix is to add libc++ as a linked library. Have you tried that?

@vanerleo
Copy link

vanerleo commented Sep 2, 2020

@robr2112 the only way i found to fix this is to add

        <framework src="libstdc++.dylib" /> 

plugins/cordova-plugin-brother-label-printer/plugin.xml
on line 90

and remove platforms folder

@vanerleo
Copy link

vanerleo commented Sep 2, 2020

@robr2112
When using IOS emulator should findPrinters return printer attached to the Host MAC via USB ( using Brother QL-820NWB )?

i can get the printer if Printer is connected to the WIFI

@robr2112
Copy link

robr2112 commented Sep 8, 2020

@vanerleo, No, I would not expect simulator to find USB-connected printers. It might find using Ethernet if you're looking for a cable-based setup.

@vanerleo
Copy link

when building a release version getting an error

building for iOS Simulator, but linking in object file built for iOS, file 'Plugins/cordova-plugin-brother-label-printer/BRPtouchPrinterKit.framework/BRPtouchPrinterKit' for architecture arm64

any solutions for this?

@robr2112
Copy link

@vanerleo, sorry I'm not sure. Sounds like a build system issue. Have you tried doing a "clean" or "rebuild all"? Or deleting "Derived Data" for your app?

@robr2112
Copy link

robr2112 commented Oct 1, 2020

@vanerleo Have you solved this yet? Are you using Xcode 12 by any chance? I just ran into a similar problem with Xcode 12.0.0. Problem doesn't happen with Xcode 11.6. Haven't tried 12.0.1 yet to see if it fixes this, but doesn't seem likely. The following StackOverflow post may provide an answer. I'm still reviewing this myself. https://stackoverflow.com/questions/63607158/xcode-12-building-for-ios-simulator-but-linking-in-object-file-built-for-ios

@vanerleo
Copy link

vanerleo commented Nov 8, 2020

@robr2112 using Xcode Version 12.1 (12A7403)

@robr2112
Copy link

@vanerleo OK, refer to the StackOverflow post I mentioned before. This is a new problem with Xcode12, which you will typically encounter when you build for Simulator in the Release configuration (which creates a Universal Binary, i.e. "Build Active Architecture Only" = NO). You may not have the problem when building for Debug configuration....unless you want to use a simulator that has arm64 processor...since Debug configuration will typically not try to create a UB. The SO post describes some ways to fix this for "Release" configuration by modifying the "Excluded Architectures" setting to exclude arm64 when building for Simulators.

I have verified that this does work, at least on a Native iOS project using only Xcode and not Cordova. I don't know how to resolve this in Cordova dev environment, as I am not a Cordova developer.

-Rob

@vanerleo
Copy link

Managed to get this to work by moving to ionic-capacitor and compiling directly in xcode ( that was fun)

Emulator : No issues
In release:
unable to locate the printer on the wifi network on any device running iOS 13.8 or newer. While emulator has no issues.

Any ideas why this would be happening?

@robr2112
Copy link

@vanerleo, great that you could fix by moving to Ionic-Capacitor. Not sure why Cordova is not working? But at least you found a solution.

About the iOS13.8+ problem with WIFI Search:
I know that iOS14+ requires adding new settings for Bonjour Services to the Info.plist to allow search.
Didn't know this (may have) started at 13.8.

Please add the following information in the Info.plist:

  1. Privacy – Local Network Usage Description
  • NOTE: IMO, this is optional only to customize the default system message if you want, but Apple might require it. Anyway, Apple now requires users to "opt in" to "Local Network" usage in Apps, for user privacy concerns.
  1. Bonjour services (This is what will enable Search to work again)
  • _pdl-datastream._tcp
  • _printer._tcp
  • _ipp._tcp

@arcadius
Copy link

closing as @vanerleo managed to get it working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants