10000 Chromium Libbase - Undefined symbols for architecture x86_64 · Issue #11605 · electron/electron · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
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

Chromium Libbase - Undefined symbols for architecture x86_64 #11605

Closed
AdrienFery opened this issue Jan 9, 2018 · 1 comment
Closed

Chromium Libbase - Undefined symbols for architecture x86_64 #11605

AdrienFery opened this issue Jan 9, 2018 · 1 comment

Comments

@AdrienFery
Copy link
Contributor
  • Electron version: 1.8.2-beta.2
  • Operating system: macOS (10.12.6)

I have created a pull request few weeks ago #11292 to add Mac In-App Purchase to Electron. While it works well with the MacOSX10.13.sdk, it doesn't compile with the MacOSX10.10.sdk.

There is a linker error Undefined symbols for architecture x86_64 each time a function from the base namespace (Chromium Libbase) is used in the code.

For example, base::SysUTF8ToNSString is used here and there is an error while the library is included here. I spent a good time trying to understand where the problem came from but I can't find how to solve this issue.

Can someone help me with this?

Actual behavior

[1525/1538] LINK 'Electron Helper.app/Contents/MacOS/Electron Helper', POSTBUILDS
FAILED: ../../vendor/llvm-build/Release+Asserts/bin/clang++ -stdlib=libc++ -mmacosx-version-min=10.9 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -arch x86_64 -L. -Wl,-rpath,@executable_path/../../.. -F/Users/adrien/Programming/electron/external_binaries -stdlib=libc++ -o 'Electron Helper.app/Contents/MacOS/Electron Helper' obj/atom/app/electron_helper.atom_main.o obj/atom/browser/ui/electron_helper.in_app_purchase_mac.o obj/atom/browser/ui/electron_helper.in_app_purchase_observer_mac.o 'Electron Framework.framework/Versions/A/Electron Framework'  -framework Carbon -framework QuartzCore -framework Quartz -framework Security -framework SecurityInterface -framework ServiceManagement -framework StoreKit -framework Squirrel -framework ReactiveCocoa -framework Mantle
Undefined symbols for architecture x86_64:
  "base::SysUTF8ToNSString(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
      in_app_purchase::PurchaseProduct(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, base::Callback<void (bool), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> const&) in electron_helper.in_app_purchase_mac.o
  "base::internal::CallbackBase<(base::internal::CopyMode)0>::CallbackBase(base::internal::BindStateBase*)", referenced from:
      base::internal::CallbackBase<(base::internal::CopyMode)1>::CallbackBase(base::internal::BindStateBase*) in electron_helper.in_app_purchase_mac.o
      base::internal::CallbackBase<(base::internal::CopyMode)1>::CallbackBase(base::internal::BindStateBase*) in electron_helper.in_app_purchase_observer_mac.o
  "base::internal::CallbackBase<(base::internal::CopyMode)0>::~CallbackBase()", referenced from:
      base::internal::CallbackBase<(base::internal::CopyMode)1>::~CallbackBase() in electron_helper.in_app_purchase_mac.o
      base::internal::CallbackBase<(base::internal::CopyMode)1>::~CallbackBase() in electron_helper.in_app_purchase_observer_mac.o
  "base::internal::CallbackBase<(base::internal::CopyMode)1>::operator=(base::internal::CallbackBase<(base::internal::CopyMode)1> const&)", referenced from:
      base::Callback<void (bool), (base::internal::CopyMode)1, (base::internal::RepeatMode)1>::operator=(base::Callback<void (bool), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> const&) in electron_helper.in_app_purchase_mac.o
      base::Callback<void (in_app_purchase::Payment, in_app_purchase::Transaction), (base::internal::CopyMode)1, (base::internal::RepeatMode)1>::operator=(base::Callback<void (in_app_purchase::Payment, in_app_purchase::Transaction), (base::internal::CopyMode)1, (base::internal::RepeatMode)1> const&) in electron_helper.in_app_purchase_observer_mac.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
@zcbenz
Copy link
Contributor
zcbenz commented Jan 10, 2018

I have solved this as part of #11292.

@zcbenz zcbenz closed this as completed Jan 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
0