BFLC-demo icon indicating copy to clipboard operation
BFLC-demo copied to clipboard

编译问题

Open GuangguangLu opened this issue 1 year ago • 7 comments

[100%] Linking CXX executable ../../bin/fisco-bcos /usr/bin/ld.gold: error: cannot find -l... collect2: error: ld returned 1 exit status make[2]: *** [fisco-bcos/main/CMakeFiles/fisco-bcos.dir/build.make:150: bin/fisco-bcos] Error 1 make[1]: *** [CMakeFiles/Makefile2:2225: fisco-bcos/main/CMakeFiles/fisco-bcos.dir/all] Error 2 make: *** [Makefile:130: all] Error 2

对着FISCO文档进行源码时成功了。 但是对着Github的步骤进行编译时就会报以上的错误。 欢迎讨论:q:82316637

GuangguangLu avatar Apr 12 '23 07:04 GuangguangLu

您好,可以查看一下已解决的issue #1 ,里面有相关的疑问回复

iammcy avatar Apr 12 '23 08:04 iammcy

您好,我看到了您的快速答复,但是呆呆的我没有理解如何修改。 【在C.txt配置步骤中,不是直接添加target_link_libraries(precompiled PRIVATE ... nlohmann_json)这句命令,是在原有的target_link_libraries命令中加入nlohmann_json目标链接库的英文,“...”代表其他目标链接库,可能错误发生在这里,可以再仔细查看<working_dir>/FISCO-BCOS/libprecompiled/CMakeLists.txt的配置说明,感谢您的反馈!】

①  这是您的Github操作:

在target_link_libraries命令中增加nlohmann_json目标链接库,其中“...”代表其他目标链接库 target_link_libraries(precompiled PRIVATE ... nlohmann_json)②  这是Cmakelist.txt原文件:file(GLOB_RECURSE SRC_LIST ".cpp") file(GLOB_RECURSE HEADERS ".h")add_library(precompiled ${SRC_LIST} ${HEADERS})target_link_libraries(precompiled PRIVATE blockverifier ethcore, nlohmann_json)target_link_libraries(precompiled PUBLIC storage devcore JsonCpp)target_link_libraries(precompiled PRIVATE Paillier GroupSig VRF)add_subdirectory(extension)③ 确实如您所说,我是直接添加了一行:target_link_libraries(precompiled PRIVATE ... nlohmann_json)。 请您教导我应该如何书写目标链接库。

------------------ 原始邮件 ------------------ 发件人: "iammcy/BFLC-demo" @.>; 发送时间: 2023年4月12日(星期三) 下午4:52 @.>; @.@.>; 主题: Re: [iammcy/BFLC-demo] 编译问题 (Issue #39)

您好,可以查看一下已解决的issue #1 ,里面有相关的疑问回复

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

GuangguangLu avatar Apr 12 '23 09:04 GuangguangLu

target_link_libraries命令已在CMakeLists.txt文件了,只需要加上nlohmann_json在后面位置上

iammcy avatar Apr 12 '23 10:04 iammcy

您好,请问您解决这个问题了么

EvilLevis avatar Feb 17 '24 09:02 EvilLevis

您好,请问您解决这个问题了么

解决了: image

GuangguangLu avatar Feb 17 '24 11:02 GuangguangLu

谢谢您

EvilLevis avatar Feb 17 '24 12:02 EvilLevis

您好,请问您有遇到过time out的问题吗

EvilLevis avatar Apr 23 '24 12:04 EvilLevis