【问题标题】:How to using gui nana library with biicode如何在 biicode 中使用 gui nana 库
【发布时间】:2015-04-11 10:34:38
【问题描述】:

我正在尝试使用 Biicode 使用 nana gui 库编译我的代码。 https://www.biicode.com/qiangwu/qiangwu/nana/master/0/biicode.conf

    # Biicode configuration file migrated from old config files

[requirements]
    qiangwu/nana: 0

[parent]

[paths]

[dependencies]
    include/nana/config.hpp + build/cmake/config.hpp
[mains]

[hooks]

[includes]

[data]

命令后bii build 输出是:

H:\na4\nana>bii build
INFO: Processing changes...
WARN: user/nana/biicode.conf, [dependencies] include/nana/config.hpp + build/cmake/config.hpp
        There are no files matching pattern include/nana/config.hpp
Building: "cmake" --build .

                BLOCK: qiangwu/nana
-----------------------------------------------------------
CMake Error at H:/na4/nana/bii/deps/qiangwu/nana/CMakeLists.txt:19 (list):
  list sub-command REMOVE_ITEM requires two or more arguments.


Error copying file (if different) from "H:/na4/nana/bii/deps/qiangwu/nana/build/cmake/config.hpp" to "H:/na4/nana/bii/deps/qiangwu/nana/include/nana/".
+ LIB: qiangwu_nana

                BLOCK: user/nana
-----------------------------------------------------------
+ LIB: user_nana
+ EXE: user_nana_main
-- Configuring incomplete, errors occurred!
See also "H:/na4/nana/bii/build/CMakeFiles/CMakeOutput.log".
See also "H:/na4/nana/bii/build/CMakeFiles/CMakeError.log".
mingw32-make.exe: *** [cmake_check_build_system] Error 1
ERROR: Build failed

CmakeLists.txt:

if(NOT BIICODE)
    project(nana)
    cmake_minimum_required(VERSION 2.8)
else()
    set(LIB_SRC ${BII_LIB_SRC})

    foreach(cpp ${BII_LIB_SRC})
        if(${cpp} MATCHES "(include/nana|source)/detail/[A-Za-z0-9_]+/.+$")
            list(APPEND trash_files ${cpp})
        endif()
    endforeach()

    list(REMOVE_ITEM BII_LIB_SRC ${trash_files})
endif()

第 19 行是:“列表(REMOVE_ITEM BII_LIB_SRC ${trash_files})”

【问题讨论】:

  • 我尝试在“bii open”之后构建您的代码,但遇到了一些问题。我正在尝试在 Win 中使用 MinGW。错误输出不显示。代码中似乎没有“主要”,因此没有构建目标。你能告诉你的开发设置(操作系统、编译器等)吗?如果您添加到 github 存储库(您的 fork)的链接,并且您正在进行的工作在一个分支中,这也很有用。从那里进行协作要容易得多。

标签: biicode nana


【解决方案1】:

似乎与 biicode 无关,而是与 CMake 相关。您的 ${trash_files} 变量实际上是空的,然后 REMOVE_ITEM 列表函数失败。在常规 CMakeLists.txt 中检查此代码:

SET(MY_VAR a b c)
SET(TRASH_FILES )
SET(MY_LIST a b c d)
foreach(cpp ${MY_VAR})
    if(${cpp} MATCHES d)
        list(APPEND trash_files ${cpp})
    endif()
endforeach()
list(REMOVE_ITEM MY_LIST ${trash_files})

如果您认为在此类操作中变量可能为空,请使用条件保护该代码:

if(trash_files)
    list(REMOVE_ITEM MY_LIST ${trash_files})
endif()

【讨论】:

    【解决方案2】:

    最近它是一个更新解决这个问题。

    在 GitHub 中,您需要使用分支 develop

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-05
      • 2021-10-19
      • 1970-01-01
      • 1970-01-01
      • 2021-05-17
      相关资源
      最近更新 更多