1
General / Re: Hidden symbols when static linking
« on: June 11, 2018, 08:39:45 pm »
Changing the linking order unfortunately did not help. As you suggested, building the ckd binary without the libck dynamic library makes it build successfully:
I am still curious though why I cannot statically link SFML with my dynamic libck library. The motivation being that libck is distinct from ckd and could even be seperate repos in the future.
Code: [Select]
g++ src/client/main.cpp.o src/client/rpcserver.cpp.o src/client/wallet.cpp.o src/client/httpserver.cpp.o src/client/multicoin.cpp.o src/kernel/blockchain.cpp.o src/kernel/blockchaintypes.cpp.o src/kernel/math.cpp.o src/kernel/storage.cpp.o src/kernel/network.cpp.o src/kernel/networkpeer.cpp.o src/kernel/base64.cpp.o src/kernel/crypto.cpp.o src/kernel/log.cpp.o src/kernel/contract.cpp.o src/kernel/consensus/AVRR.cpp.o src/kernel/consensus/PoW.cpp.o src/kernel/merkletree.cpp.o src/kernel/consensus/regtest.cpp.o src/kernel/consensus/Lyra2REv2/Lyra2RE.c.o src/kernel/consensus/Lyra2REv2/Lyra2.c.o src/kernel/consensus/Lyra2REv2/Sponge.c.o src/kernel/consensus/Lyra2REv2/sha3/blake.c.o src/kernel/consensus/Lyra2REv2/sha3/cubehash.c.o src/kernel/consensus/Lyra2REv2/sha3/keccak.c.o src/kernel/consensus/Lyra2REv2/sha3/skein.c.o src/kernel/consensus/Lyra2REv2/sha3/bmw.c.o -o ckd -L/usr/lib -I. -L. -L/usr/local/lib -Wl,-rpath -Wl,./ -lsfml-network -lsfml-system -llua5.3 -lcrypto -ldl -pthread -lleveldb -lmicrohttpd -ljsonrpccpp-common -ljsonrpccpp-server -ljsonrpccpp-client -lcurl -lgcov -ljsoncpp
/usr/local/lib/liblua5.3.a(loslib.o): In function `os_tmpname':
loslib.c:(.text+0x2b0): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
Removing intermediate container 983225e60510
---> 5346ce542187
Successfully built 5346ce542187
I am still curious though why I cannot statically link SFML with my dynamic libck library. The motivation being that libck is distinct from ckd and could even be seperate repos in the future.