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

使用clion-cmake运行raftCoreRun出现 delimiter[abi:cxx11] 重定义问题 #63

Closed
DUTRB opened this issue May 16, 2024 · 3 comments
Closed

Comments

@DUTRB
Copy link

DUTRB commented May 16, 2024

以下是运行raftCoreRun报错信息,似乎是delimiter重定义,但是项目中只有 skiplist.h文件中使用static定义了delimiter为冒号,不理解这个问题出现在哪?
运行原项目是没有问题的,这是我新建的项目。

====================[ 构建 | raftCoreRun | Debug ]================================
/opt/clion/clion-2023.3.4/bin/cmake/linux/x64/bin/cmake --build /home/void/CLionProjects/MyRaft-KVstoragePro/cmake-build-debug --target raftCoreRun -j 3
[1/1] Linking CXX executable /home/void/CLionProjects/MyRaft-KVstoragePro/bin/raftCoreRun
FAILED: /home/void/CLionProjects/MyRaft-KVstoragePro/bin/raftCoreRun 
: && /usr/bin/c++ -g  example/raftCoreExample/CMakeFiles/raftCoreRun.dir/raftKvDB.cpp.o -o /home/void/CLionProjects/MyRaft-KVstoragePro/bin/raftCoreRun -L/home/void/CLionProjects/MyRaft-KVstoragePro/lib -Wl,-rpath,/home/void/CLionProjects/MyRaft-KVstoragePro/lib  /home/void/CLionProjects/MyRaft-KVstoragePro/lib/libskip_list_on_raft.a  /home/void/CLionProjects/MyRaft-KVstoragePro/lib/librpc_lib.a  -lprotobuf  -lmuduo_net  -lmuduo_base  -lpthread  -ldl  -lboost_serialization && :
/usr/bin/ld: /home/void/CLionProjects/MyRaft-KVstoragePro/lib/libskip_list_on_raft.a(kvServer.cpp.o):(.bss+0x0): multiple definition of `delimiter[abi:cxx11]'; example/raftCoreExample/CMakeFiles/raftCoreRun.dir/raftKvDB.cpp.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Copy link

Message that will be displayed on users' first issue

@DUTRB DUTRB closed this as completed May 16, 2024
@DUTRB
Copy link
Author

DUTRB commented May 16, 2024

重构项目已解决!

@DUTRB
Copy link
Author

DUTRB commented May 16, 2024

发现问题出在 我修改后的 skiplist.h文件中 delimiter 没有定义为静态static变量。

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