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

ld.lld: error: duplicate symbol: CryptoPP::CallNewHandler() #1263

Open
thumb0422 opened this issue Mar 9, 2024 · 0 comments
Open

ld.lld: error: duplicate symbol: CryptoPP::CallNewHandler() #1263

thumb0422 opened this issue Mar 9, 2024 · 0 comments

Comments

@thumb0422
Copy link

env: MacBook Pro Apple M3

ld.lld: error: duplicate symbol: CryptoPP::CallNewHandler()

defined at allocate.cpp:29 (/Users/XXXX/Documents/work/lib-encrypt/EMCrypto/src/main/cpp/cryptopp/allocate.cpp:29)
allocate.cpp.o:(CryptoPP::CallNewHandler()) in archive libcryptopp.a
defined at misc.cpp:121 (/Users/XXXX/Documents/work/lib-encrypt/EMCrypto/src/main/cpp/cryptopp/misc.cpp:121)
misc.cpp.o:(.text._ZN8CryptoPP14CallNewHandlerEv+0x0) in archive libcryptopp.a

ld.lld: error: duplicate symbol: CryptoPP::UnalignedAllocate(unsigned long)

defined at allocate.cpp:90 (/Users/XXXX/Documents/work/lib-encrypt/EMCrypto/src/main/cpp/cryptopp/allocate.cpp:90)
allocate.cpp.o:(CryptoPP::UnalignedAllocate(unsigned long)) in archive libcryptopp.a
defined at misc.cpp:173 (/Users/XXXX/Documents/work/lib-encrypt/EMCrypto/src/main/cpp/cryptopp/misc.cpp:173)
misc.cpp.o:(.text._ZN8CryptoPP17UnalignedAllocateEm+0x0) in archive libcryptopp.a

ld.lld: error: duplicate symbol: CryptoPP::UnalignedDeallocate(void*)

defined at allocate.cpp:98 (/Users/XXXX/Documents/work/lib-encrypt/EMCrypto/src/main/cpp/cryptopp/allocate.cpp:98)
allocate.cpp.o:(CryptoPP::UnalignedDeallocate(void*)) in archive libcryptopp.a
defined at misc.cpp:181 (/Users/XXXX/Documents/work/lib-encrypt/EMCrypto/src/main/cpp/cryptopp/misc.cpp:181)
misc.cpp.o:(.text._ZN8CryptoPP19UnalignedDeallocateEPv+0x0) in archive libcryptopp.a
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
Detail: Please check the message from tools.

How to fix it

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

1 participant