- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
总的来说,我尝试遵循 cross compile azure iot sdk 中的准则.
以下是azure-iot-sdk-c/build_all/linux
中toolchain-bb.cmake
的内容
INCLUDE(CMakeForceCompiler)
SET(CMAKE_SYSTEM_NAME Linux) # this one is important
SET(CMAKE_SYSTEM_VERSION 1) # this one not so much
SET(CMAKE_C_COMPILER /mnt/yocto/bsp-yocto/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc)
SET(CMAKE_FIND_ROOT_PATH /mnt/yocto/yocto_repo/build/arago-tmp-external-linaro-toolchain/sysroots/am57xx-evm/usr)
# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
# openssl directories
SET(OPENSSL_ROOT_DIR /mnt/yocto/yocto_repo/build/tmp/sysroots/am57xx-evm/usr/lib/)
SET(OPENSSL_INCLUDE_DIR /mnt/yocto/yocto_repo/build/tmp/sysroots/am57xx-evm/usr/include/)
SET(CURL_LIBRARY /mnt/yocto/yocto_repo/build/tmp/sysroots/am57xx-evm/usr/lib/libcurl.a)
SET(CURL_INCLUDE_DIR /mnt/yocto/yocto_repo/build/tmp/sysroots/am57xx-evm/usr/include/curl/)
SET(UUID_LIBRARY_DIRS /mnt/yocto/yocto_repo/build/arago-tmp-external-linaro-toolchain/sysroots/am57xx-evm/usr/lib)
在 azure-iot-sdk-c/build_all/linux/
我使用以下命令:
sudo ./build.sh --toolchain-file toolchain-bb.cmake
这是输出:
Linking C static library libumqtt.a
Linking C executable iot_c_utility
[ 68%] Built target umqtt
Scanning dependencies of target iothub_client_mqtt_transport
Scanning dependencies of target iothub_client_mqtt_ws_transport
/mnt/yocto/bsp-yocto/gcc-linaro-5.3-2016.02-x86_64_arm-linux-
gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/5.3.1/../../../../arm-linux-
gnueabihf/bin/ld: cannot find -luuid
collect2: error: ld returned 1 exit status
make[2]: *** [c-utility/samples/iot_c_utility/iot_c_utility] Error 1
make[1]: *** [c-
utility/samples/iot_c_utility/CMakeFiles/iot_c_utility.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
在上面列出的 StackOverflow 链接中,提到 --sysroot
非常重要。但是,当我如下所示指定 --sysroot
时,构建很早就失败了(即构建中大约 [5%])。
sudo ./build.sh --toolchain-file toolchain-bb.cmake -cl --sysroot=/mnt/yocto/bsp-yocto/gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf/lib
重要说明:libuuid.a
存在于:
/mnt/yocto/yocto_repo/build/arago-tmp-external-linaro-toolchain/sysroots/am57xx-evm/usr/lib
最佳答案
您应该包含这一行:
set(compileOption_C "--sysroot=<your_path_to_sysroot>")
并确保您已在主机系统中安装了 libuuid
sudo apt-get install uuid-dev
关于c - azure-iot-sdk-c 交叉编译链接器问题 : ld: cannot find -luuid,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48738129/
我得到了一个非常简单的 .net 核心应用程序,它使用 REST 在 mongo db 中添加和下载对象。添加项目非常有效。获取包含所有项目的列表,但是当我尝试使用 id 访问一个列表时,每次我都得到
我正在尝试将带有 LUUID(或本示例中的 NUUID)的过滤器反序列化为 BsonDocument: var tmpQry = "{'ValueId': NUUID('ca7ac84f-18bf-4
这个问题在这里已经有了答案: What is an undefined reference/unresolved external symbol error and how do I fix it?
总的来说,我尝试遵循 cross compile azure iot sdk 中的准则. 以下是azure-iot-sdk-c/build_all/linux中toolchain-bb.cmake的内
我正在尝试将数据从 mongodb 移动到 mysql 我使用 mongoexport 将数据从 mongodb 数据库导出到 .json 文件 当我使用 robomongo 浏览我的 mongodb
我是一名优秀的程序员,十分优秀!