The QT project adds a third-party external library, and the compilation fails(" undefined reference to xxxxxx")
-
qt widgets application project,add a third-party external library(tuyaos link sdk)
doc: https://developer.tuya.com/en/docs/iot/tuya-iot-qr-sdk?id=K9nqa9pgrs198
sources: https://github.com/TuyaInc/tuya_DeviceOS_SDK/blob/master/IOT Device OS/ty_iot_wr_qr_sdk/1.0.3/1.0.3_linux-ubuntu-6.2.0_64Bit.tar.gz
OS: Deepin 20.2.2
Kernel: x86_64 Linux 5.12.9-amd64-desktop
DE: Deepin 20.2.2My gcc version is gcc version 8.3.0 (Uos 8.3.0.3-3+rebuild),Report errors:undefined reference to xxxxxx.
So I installed gcc6.2.0, still this error.g++ -o qt_liunx64_tuya_sdk main.o -L/home/houyawei/Desktop/work_source/qt_liunx64_tuya_sdk/./ -ltuya_iot /usr/lib/x86_64-linux-gnu/libQt5Core.so -lpthread /usr/bin/ld: /home/houyawei/Desktop/work_source/qt_liunx64_tuya_sdk/.//libtuya_iot.a(tuya_iot_com_api.c.o): in function `tuya_iot_upload_rst_log_set': /root/workspace_temp/EmbedSDKs/ty_iot_wr_qr_sdk/ty_iot_wr_qr_sdk/sdk/svc_api_iot/src/tuya_iot_com_api.c:334: undefined reference to `gw_upload_rst_log_set' /usr/bin/ld: /home/houyawei/Desktop/work_source/qt_liunx64_tuya_sdk/.//libtuya_iot.a(base_nw_intf.c.o): in function `bnw_get_ip': /root/workspace_temp/EmbedSDKs/ty_iot_wr_qr_sdk/ty_iot_wr_qr_sdk/sdk/base_wired_intf/src/base_nw_intf.c:33: undefined reference to `tuya_hal_wired_get_ip' /usr/bin/ld: /home/houyawei/Desktop/work_source/qt_liunx64_tuya_sdk/.//libtuya_iot.a(base_nw_intf.c.o): in function `bnw_station_conn': /root/workspace_temp/EmbedSDKs/ty_iot_wr_qr_sdk/ty_iot_wr_qr_sdk/sdk/base_wired_intf/src/base_nw_intf.c:44: undefined reference to `tuya_hal_wired_station_conn' /usr/bin/ld: /home/houyawei/Desktop/work_source/qt_liunx64_tuya_sdk/.//libtuya_iot.a(base_nw_intf.c.o): in function `bnw_set_station_connect': /root/workspace_temp/EmbedSDKs/ty_iot_wr_qr_sdk/ty_iot_wr_qr_sdk/sdk/base_wired_intf/src/base_nw_intf.c:55: undefined reference to `tuya_hal_wired_wifi_set_station_connect' /usr/bin/ld: /home/houyawei/Desktop/work_source/qt_liunx64_tuya_sdk/.//libtuya_iot.a(base_nw_intf.c.o): in function `bnw_need_wifi_cfg': /root/workspace_temp/EmbedSDKs/ty_iot_wr_qr_sdk/ty_iot_wr_qr_sdk/sdk/base_wired_intf/src/base_nw_intf.c:66: undefined reference to `tuya_hal_wired_wifi_need_cfg' /usr/bin/ld: /home/houyawei/Desktop/work_source/qt_liunx64_tuya_sdk/.//libtuya_iot.a(base_nw_intf.c.o): in function `bnw_station_get_conn_ap_rssi': /root/workspace_temp/EmbedSDKs/ty_iot_wr_qr_sdk/ty_iot_wr_qr_sdk/sdk/base_wired_intf/src/base_nw_intf.c:78: undefined reference to `tuya_hal_wired_wifi_station_get_conn_ap_rssi' /usr/bin/ld: /home/houyawei/Desktop/work_source/qt_liunx64_tuya_sdk/.//libtuya_iot.a(base_nw_intf.c.o): in function `bnw_get_mac': /root/workspace_temp/EmbedSDKs/ty_iot_wr_qr_sdk/ty_iot_wr_qr_sdk/sdk/base_wired_intf/src/base_nw_intf.c:89: undefined reference to `tuya_hal_wired_get_mac' /usr/bin/ld: /home/houyawei/Desktop/work_source/qt_liunx64_tuya_sdk/.//libtuya_iot.a(base_nw_intf.c.o): in function `bnw_set_mac': /root/workspace_temp/EmbedSDKs/ty_iot_wr_qr_sdk/ty_iot_wr_qr_sdk/sdk/base_wired_intf/src/base_nw_intf.c:100: undefined reference to `tuya_hal_wired_set_mac' /usr/bin/ld: /home/houyawei/Desktop/work_source/qt_liunx64_tuya_sdk/.//libtuya_iot.a(base_nw_intf.c.o): in function `bnw_if_wired_connect_net': /root/workspace_temp/EmbedSDKs/ty_iot_wr_qr_sdk/ty_iot_wr_qr_sdk/sdk/base_wired_intf/src/base_nw_intf.c:111: undefined reference to `tuya_hal_wired_if_connect_internet' collect2: error: ld returned 1 exit status make: *** [Makefile:359: qt_liunx64_tuya_sdk] Error 1 10:28:27: 进程"/usr/bin/make"退出,退出代码 2 。 Error while building/deploying project qt_liunx64_tuya_sdk (kit: 桌面gcc6.2.0) When executing step "Make"
Can you give me some suggestions, thanks
-
@ChrisW67 said in The QT project adds a third-party external library, and the compilation fails(" undefined reference to xxxxxx"):
Show us how you added the third party library to your project (PRO file or CMake.)
QT -= gui CONFIG += c++11 console CONFIG -= app_bundle # You can make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 SOURCES += \ main.cpp # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target unix:!macx: LIBS += -L$$PWD/./ -ltuya_iot INCLUDEPATH += $$PWD/. \ $$PWD/./sdk/include DEPENDPATH += $$PWD/. unix:!macx: PRE_TARGETDEPS += $$PWD/./libtuya_iot.a DISTFILES += \ sdk/lib/libtuya_iot.a \ sdk/lib/libtuya_iot.a.stripped HEADERS += \ sdk/include/aes_inf.h \ sdk/include/ak_lan_protocol.h \ sdk/include/app_agent.h \ sdk/include/apr_sha1.h \ sdk/include/async_notify.h \ sdk/include/base_event.h \ sdk/include/base_event_info.h \ sdk/include/base_nw_intf.h \ sdk/include/cJSON.h \ sdk/include/com_mmod.h \ sdk/include/com_protocol.h \ sdk/include/crc32i.h \ sdk/include/crc_16.h \ sdk/include/crc_8.h \ sdk/include/direct_connect_tuya.h \ sdk/include/driver/tuya_hal_bt.h \ sdk/include/driver/tuya_hal_i2c.h \ sdk/include/driver/tuya_hal_rtc.h \ sdk/include/driver/tuya_hal_storge.h \ sdk/include/driver/tuya_hal_wifi.h \ sdk/include/driver/tuya_hal_wired.h \ sdk/include/gw_intf.h \ sdk/include/hashmap.h \ sdk/include/http_inf.h \ sdk/include/http_manager.h \ sdk/include/httpc.h \ sdk/include/iot_httpc.h \ sdk/include/ipc_httpc.h \ sdk/include/kv_storge.h \ sdk/include/lan_protocol.h \ sdk/include/log_seq.h \ sdk/include/mbedtls/aes.h \ sdk/include/mbedtls/aes_alt.h \ sdk/include/mbedtls/aesni.h \ sdk/include/mbedtls/arc4.h \ sdk/include/mbedtls/aria.h \ sdk/include/mbedtls/asn1.h \ sdk/include/mbedtls/asn1write.h \ sdk/include/mbedtls/base64.h \ sdk/include/mbedtls/bignum.h \ sdk/include/mbedtls/blowfish.h \ sdk/include/mbedtls/bn_mul.h \ sdk/include/mbedtls/camellia.h \ sdk/include/mbedtls/ccm.h \ sdk/include/mbedtls/certs.h \ sdk/include/mbedtls/chacha20.h \ sdk/include/mbedtls/chachapoly.h \ sdk/include/mbedtls/check_config.h \ sdk/include/mbedtls/cipher.h \ sdk/include/mbedtls/cipher_internal.h \ sdk/include/mbedtls/cmac.h \ sdk/include/mbedtls/compat-1.3.h \ sdk/include/mbedtls/config.h \ sdk/include/mbedtls/ctr_drbg.h \ sdk/include/mbedtls/debug.h \ sdk/include/mbedtls/des.h \ sdk/include/mbedtls/dhm.h \ sdk/include/mbedtls/ecdh.h \ sdk/include/mbedtls/ecdsa.h \ sdk/include/mbedtls/ecjpake.h \ sdk/include/mbedtls/ecp.h \ sdk/include/mbedtls/ecp_internal.h \ sdk/include/mbedtls/entropy.h \ sdk/include/mbedtls/entropy_poll.h \ sdk/include/mbedtls/error.h \ sdk/include/mbedtls/gcm.h \ sdk/include/mbedtls/havege.h \ sdk/include/mbedtls/hkdf.h \ sdk/include/mbedtls/hmac_drbg.h \ sdk/include/mbedtls/md.h \ sdk/include/mbedtls/md2.h \ sdk/include/mbedtls/md4.h \ sdk/include/mbedtls/md5.h \ sdk/include/mbedtls/md_internal.h \ sdk/include/mbedtls/memory_buffer_alloc.h \ sdk/include/mbedtls/net.h \ sdk/include/mbedtls/net_sockets.h \ sdk/include/mbedtls/nist_kw.h \ sdk/include/mbedtls/oid.h \ sdk/include/mbedtls/padlock.h \ sdk/include/mbedtls/pem.h \ sdk/include/mbedtls/pk.h \ sdk/include/mbedtls/pk_internal.h \ sdk/include/mbedtls/pkcs11.h \ sdk/include/mbedtls/pkcs12.h \ sdk/include/mbedtls/pkcs5.h \ sdk/include/mbedtls/platform.h \ sdk/include/mbedtls/platform_time.h \ sdk/include/mbedtls/platform_util.h \ sdk/include/mbedtls/poly1305.h \ sdk/include/mbedtls/ripemd160.h \ sdk/include/mbedtls/rsa.h \ sdk/include/mbedtls/rsa_internal.h \ sdk/include/mbedtls/sha1.h \ sdk/include/mbedtls/sha256.h \ sdk/include/mbedtls/sha512.h \ sdk/include/mbedtls/ssl.h \ sdk/include/mbedtls/ssl_cache.h \ sdk/include/mbedtls/ssl_ciphersuites.h \ sdk/include/mbedtls/ssl_cookie.h \ sdk/include/mbedtls/ssl_internal.h \ sdk/include/mbedtls/ssl_ticket.h \ sdk/include/mbedtls/threading.h \ sdk/include/mbedtls/timing.h \ sdk/include/mbedtls/version.h \ sdk/include/mbedtls/x509.h \ sdk/include/mbedtls/x509_crl.h \ sdk/include/mbedtls/x509_crt.h \ sdk/include/mbedtls/x509_csr.h \ sdk/include/mbedtls/xtea.h \ sdk/include/mem_pool.h \ sdk/include/mix_method.h \ sdk/include/mqc_app.h \ sdk/include/mqtt_client.h \ sdk/include/sdk_version.h \ sdk/include/smart_frame.h \ sdk/include/svc_online_log.h \ sdk/include/svc_online_log_db.h \ sdk/include/svc_online_log_http.h \ sdk/include/svc_online_log_mqtt.h \ sdk/include/sys_timer.h \ sdk/include/system/tuya_hal_fs.h \ sdk/include/system/tuya_hal_memory.h \ sdk/include/system/tuya_hal_mutex.h \ sdk/include/system/tuya_hal_network.h \ sdk/include/system/tuya_hal_semaphore.h \ sdk/include/system/tuya_hal_system.h \ sdk/include/system/tuya_hal_thread.h \ sdk/include/tuya_base_event_errcode.h \ sdk/include/tuya_base_log_mng_errcode.h \ sdk/include/tuya_base_msgq_error_code.h \ sdk/include/tuya_base_security_error_code.h \ sdk/include/tuya_base_storage_kv_error_code.h \ sdk/include/tuya_base_timeq_error_code.h \ sdk/include/tuya_base_uf_file_errcode.h \ sdk/include/tuya_base_utilities.h \ sdk/include/tuya_base_utilities_error_code.h \ sdk/include/tuya_base_workq_error_code.h \ sdk/include/tuya_cloud_base_defs.h \ sdk/include/tuya_cloud_com_defs.h \ sdk/include/tuya_cloud_error_code.h \ sdk/include/tuya_cloud_types.h \ sdk/include/tuya_cloud_wifi_defs.h \ sdk/include/tuya_cnt_rst.h \ sdk/include/tuya_components.h \ sdk/include/tuya_dev.h \ sdk/include/tuya_global_errcode.h \ sdk/include/tuya_iot_base_api.h \ sdk/include/tuya_iot_com_api.h \ sdk/include/tuya_iot_config.h \ sdk/include/tuya_iot_internal_api.h \ sdk/include/tuya_mid_http_error_code.h \ sdk/include/tuya_mid_mqtt_error_code.h \ sdk/include/tuya_mid_tls_error_code.h \ sdk/include/tuya_os_adapter.h \ sdk/include/tuya_os_adapter_error_code.h \ sdk/include/tuya_sdk_version.h \ sdk/include/tuya_sha256.h \ sdk/include/tuya_svc_online_log.h \ sdk/include/tuya_svc_timer_task.h \ sdk/include/tuya_svc_upgrade.h \ sdk/include/tuya_svc_upgrade_errcode.h \ sdk/include/tuya_system_dp.h \ sdk/include/tuya_tls.h \ sdk/include/tuya_tls_config_disable.h \ sdk/include/tuya_tls_config_ecc_only.h \ sdk/include/tuya_tls_config_ecc_only_ipc.h \ sdk/include/tuya_tls_config_ecc_psk.h \ sdk/include/tuya_tls_config_no_strip.h \ sdk/include/tuya_tls_config_psk_only.h \ sdk/include/tuya_uf_db.h \ sdk/include/tuya_ws_db.h \ sdk/include/ty_cJSON.h \ sdk/include/ty_work_queue.h \ sdk/include/uf_file.h \ sdk/include/uni_base64.h \ sdk/include/uni_fs.h \ sdk/include/uni_hlist.h \ sdk/include/uni_log.h \ sdk/include/uni_md5.h \ sdk/include/uni_module.h \ sdk/include/uni_msg_queue.h \ sdk/include/uni_network.h \ sdk/include/uni_pointer.h \ sdk/include/uni_queue.h \ sdk/include/uni_random.h \ sdk/include/uni_rfc.h \ sdk/include/uni_slist.h \ sdk/include/uni_thread.h \ sdk/include/uni_time.h \ sdk/include/uni_time_queue.h \ sdk/include/uni_work_queue.h \ sdk/include/ws_db_dev.h \ sdk/include/ws_db_gw.h \ sdk/include/ws_db_subdev.h
-
-
Hi,
Are you sure the library is of the correct architecture ?
-
@houyawei The linker error messages seem to all relate to hardware abstraction layer (HAL) functions for the target IOT device. Do you have all the required Tuya/hardware libraries in the project so they get added to the linker call?
Further to SGaist's comment, are you cross-compiling for a target device or compiling on the device that is to run the program?
@JoeCFD CFD LD_LIBRARY_PATH is used by ld.so at run time to find dynamic libraries. This is a link-time failure with static libraries. The missing functions might be in a dynamic library, which would be either found explicitly listed in the ld command line (as for libQt5Core.so in the error msg), or named (-l option) and found on a search path (-L option).
-
@SGaist I think this library should be available normally, after I use the official demo to compile, it can run normally.
sources: https://github.com/TuyaInc/tuya_DeviceOS_SDK/blob/master/IOT Device OS/ty_iot_wr_qr_sdk/1.0.3/1.0.3_linux-ubuntu-6.2.0_64Bit.tar.gzhouyawei@houyawei-PC:~/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3$ ./build_app.sh apps/demo_soc_dev_wired demo_soc_dev_wired 1.0.0 APP_PATH=apps/demo_soc_dev_wired APP_NAME=demo_soc_dev_wired APP_VERSION=1.0.0 USER_CMD= ~/gcc-6.2.0/bin/gcc -g -fPIC -DAPP_BIN_NAME=\"demo_soc_dev_wired\" -DUSER_SW_VER=\"1.0.0\" -I ./include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/system -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/driver -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/mbedtls -o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/tuya_iot_wired_net.c.o -c src/tuya_iot_wired_net.c ~/gcc-6.2.0/bin/gcc -g -fPIC -DAPP_BIN_NAME=\"demo_soc_dev_wired\" -DUSER_SW_VER=\"1.0.0\" -I ./include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/system -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/driver -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/mbedtls -o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/tuya_iot_soc_dev_entry.c.o -c src/tuya_iot_soc_dev_entry.c src/tuya_iot_soc_dev_entry.c: 在函数‘active_shourturl_cb’中: src/tuya_iot_soc_dev_entry.c:34:5: 警告:隐式声明函数‘tuya_qrcode_printf’ [-Wimplicit-function-declaration] tuya_qrcode_printf(ty_cJSON_GetObjectItem(item, "shortUrl")->valuestring); ^~~~~~~~~~~~~~~~~~ src/tuya_iot_soc_dev_entry.c: 在函数‘main’中: src/tuya_iot_soc_dev_entry.c:126:9: 警告:在有返回值的的函数中,‘return’不带返回值 return; ^~~~~~ src/tuya_iot_soc_dev_entry.c:115:5: 附注:在此声明 int main(int argc, char *argv[]) ^~~~ src/tuya_iot_soc_dev_entry.c:153:29: 警告:从不兼容的指针类型赋值 [-Wincompatible-pointer-types] iot_cbs.active_shorturl = active_shourturl_cb; ^ ~/gcc-6.2.0/bin/gcc -g -fPIC -DAPP_BIN_NAME=\"demo_soc_dev_wired\" -DUSER_SW_VER=\"1.0.0\" -I ./include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/system -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/driver -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/mbedtls -o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/split.c.o -c src/libqrencode/split.c ~/gcc-6.2.0/bin/gcc -g -fPIC -DAPP_BIN_NAME=\"demo_soc_dev_wired\" -DUSER_SW_VER=\"1.0.0\" -I ./include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/system -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/driver -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/mbedtls -o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/qrinput.c.o -c src/libqrencode/qrinput.c ~/gcc-6.2.0/bin/gcc -g -fPIC -DAPP_BIN_NAME=\"demo_soc_dev_wired\" -DUSER_SW_VER=\"1.0.0\" -I ./include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/system -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/driver -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/mbedtls -o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/mask.c.o -c src/libqrencode/mask.c ~/gcc-6.2.0/bin/gcc -g -fPIC -DAPP_BIN_NAME=\"demo_soc_dev_wired\" -DUSER_SW_VER=\"1.0.0\" -I ./include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/system -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/driver -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/mbedtls -o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/qrenc.c.o -c src/libqrencode/qrenc.c ~/gcc-6.2.0/bin/gcc -g -fPIC -DAPP_BIN_NAME=\"demo_soc_dev_wired\" -DUSER_SW_VER=\"1.0.0\" -I ./include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/system -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/driver -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/mbedtls -o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/qrspec.c.o -c src/libqrencode/qrspec.c ~/gcc-6.2.0/bin/gcc -g -fPIC -DAPP_BIN_NAME=\"demo_soc_dev_wired\" -DUSER_SW_VER=\"1.0.0\" -I ./include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/system -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/driver -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/mbedtls -o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/qrencode.c.o -c src/libqrencode/qrencode.c ~/gcc-6.2.0/bin/gcc -g -fPIC -DAPP_BIN_NAME=\"demo_soc_dev_wired\" -DUSER_SW_VER=\"1.0.0\" -I ./include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/system -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/driver -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/mbedtls -o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/mmask.c.o -c src/libqrencode/mmask.c ~/gcc-6.2.0/bin/gcc -g -fPIC -DAPP_BIN_NAME=\"demo_soc_dev_wired\" -DUSER_SW_VER=\"1.0.0\" -I ./include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/system -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/driver -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/mbedtls -o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/mqrspec.c.o -c src/libqrencode/mqrspec.c ~/gcc-6.2.0/bin/gcc -g -fPIC -DAPP_BIN_NAME=\"demo_soc_dev_wired\" -DUSER_SW_VER=\"1.0.0\" -I ./include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/system -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/driver -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/mbedtls -o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/bitstream.c.o -c src/libqrencode/bitstream.c ~/gcc-6.2.0/bin/gcc -g -fPIC -DAPP_BIN_NAME=\"demo_soc_dev_wired\" -DUSER_SW_VER=\"1.0.0\" -I ./include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/system -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/driver -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/mbedtls -o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/rsecc.c.o -c src/libqrencode/rsecc.c ~/gcc-6.2.0/bin/gcc /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/tuya_iot_wired_net.c.o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/tuya_iot_soc_dev_entry.c.o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/split.c.o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/qrinput.c.o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/mask.c.o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/qrenc.c.o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/qrspec.c.o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/qrencode.c.o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/mmask.c.o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/mqrspec.c.o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/bitstream.c.o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/rsecc.c.o -g -fPIC -DAPP_BIN_NAME=\"demo_soc_dev_wired\" -DUSER_SW_VER=\"1.0.0\" -I ./include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/system -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/driver -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/mbedtls -L/home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/lib -ltuya_iot -pthread -lm -o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/demo_soc_dev_wired Build APP Finish
When I removed this library(libtuya_iot.a), the demo did not compile normally.
houyawei@houyawei-PC:~/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3$ ls apps build_app.sh CHANGELOG.md output platforms README.md sdk houyawei@houyawei-PC:~/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3$ rm -rf output/ houyawei@houyawei-PC:~/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3$ mv sdk/lib/libtuya_iot.a sdk/lib/libtuya_iot.a.bak houyawei@houyawei-PC:~/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3$ ./build_app.sh apps/demo_soc_dev_wired demo_soc_dev_wired 1.0.0 APP_PATH=apps/demo_soc_dev_wired APP_NAME=demo_soc_dev_wired APP_VERSION=1.0.0 USER_CMD= ~/gcc-6.2.0/bin/gcc -g -fPIC -DAPP_BIN_NAME=\"demo_soc_dev_wired\" -DUSER_SW_VER=\"1.0.0\" -I ./include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/system -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/driver -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/mbedtls -o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/tuya_iot_wired_net.c.o -c src/tuya_iot_wired_net.c ~/gcc-6.2.0/bin/gcc -g -fPIC -DAPP_BIN_NAME=\"demo_soc_dev_wired\" -DUSER_SW_VER=\"1.0.0\" -I ./include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/system -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/driver -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/mbedtls -o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/tuya_iot_soc_dev_entry.c.o -c src/tuya_iot_soc_dev_entry.c src/tuya_iot_soc_dev_entry.c: 在函数‘active_shourturl_cb’中: src/tuya_iot_soc_dev_entry.c:34:5: 警告:隐式声明函数‘tuya_qrcode_printf’ [-Wimplicit-function-declaration] tuya_qrcode_printf(ty_cJSON_GetObjectItem(item, "shortUrl")->valuestring); ^~~~~~~~~~~~~~~~~~ src/tuya_iot_soc_dev_entry.c: 在函数‘main’中: src/tuya_iot_soc_dev_entry.c:126:9: 警告:在有返回值的的函数中,‘return’不带返回值 return; ^~~~~~ src/tuya_iot_soc_dev_entry.c:115:5: 附注:在此声明 int main(int argc, char *argv[]) ^~~~ src/tuya_iot_soc_dev_entry.c:153:29: 警告:从不兼容的指针类型赋值 [-Wincompatible-pointer-types] iot_cbs.active_shorturl = active_shourturl_cb; ^ ~/gcc-6.2.0/bin/gcc -g -fPIC -DAPP_BIN_NAME=\"demo_soc_dev_wired\" -DUSER_SW_VER=\"1.0.0\" -I ./include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/system -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/driver -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/mbedtls -o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/split.c.o -c src/libqrencode/split.c ~/gcc-6.2.0/bin/gcc -g -fPIC -DAPP_BIN_NAME=\"demo_soc_dev_wired\" -DUSER_SW_VER=\"1.0.0\" -I ./include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/system -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/driver -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/mbedtls -o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/qrinput.c.o -c src/libqrencode/qrinput.c ~/gcc-6.2.0/bin/gcc -g -fPIC -DAPP_BIN_NAME=\"demo_soc_dev_wired\" -DUSER_SW_VER=\"1.0.0\" -I ./include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/system -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/driver -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/mbedtls -o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/mask.c.o -c src/libqrencode/mask.c ~/gcc-6.2.0/bin/gcc -g -fPIC -DAPP_BIN_NAME=\"demo_soc_dev_wired\" -DUSER_SW_VER=\"1.0.0\" -I ./include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/system -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/driver -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/mbedtls -o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/qrenc.c.o -c src/libqrencode/qrenc.c ~/gcc-6.2.0/bin/gcc -g -fPIC -DAPP_BIN_NAME=\"demo_soc_dev_wired\" -DUSER_SW_VER=\"1.0.0\" -I ./include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/system -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/driver -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/mbedtls -o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/qrspec.c.o -c src/libqrencode/qrspec.c ~/gcc-6.2.0/bin/gcc -g -fPIC -DAPP_BIN_NAME=\"demo_soc_dev_wired\" -DUSER_SW_VER=\"1.0.0\" -I ./include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/system -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/driver -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/mbedtls -o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/qrencode.c.o -c src/libqrencode/qrencode.c ~/gcc-6.2.0/bin/gcc -g -fPIC -DAPP_BIN_NAME=\"demo_soc_dev_wired\" -DUSER_SW_VER=\"1.0.0\" -I ./include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/system -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/driver -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/mbedtls -o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/mmask.c.o -c src/libqrencode/mmask.c ~/gcc-6.2.0/bin/gcc -g -fPIC -DAPP_BIN_NAME=\"demo_soc_dev_wired\" -DUSER_SW_VER=\"1.0.0\" -I ./include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/system -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/driver -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/mbedtls -o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/mqrspec.c.o -c src/libqrencode/mqrspec.c ~/gcc-6.2.0/bin/gcc -g -fPIC -DAPP_BIN_NAME=\"demo_soc_dev_wired\" -DUSER_SW_VER=\"1.0.0\" -I ./include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/system -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/driver -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/mbedtls -o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/bitstream.c.o -c src/libqrencode/bitstream.c ~/gcc-6.2.0/bin/gcc -g -fPIC -DAPP_BIN_NAME=\"demo_soc_dev_wired\" -DUSER_SW_VER=\"1.0.0\" -I ./include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/system -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/driver -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/mbedtls -o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/rsecc.c.o -c src/libqrencode/rsecc.c ~/gcc-6.2.0/bin/gcc /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/tuya_iot_wired_net.c.o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/tuya_iot_soc_dev_entry.c.o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/split.c.o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/qrinput.c.o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/mask.c.o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/qrenc.c.o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/qrspec.c.o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/qrencode.c.o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/mmask.c.o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/mqrspec.c.o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/bitstream.c.o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/.objs/./src/libqrencode/rsecc.c.o -g -fPIC -DAPP_BIN_NAME=\"demo_soc_dev_wired\" -DUSER_SW_VER=\"1.0.0\" -I ./include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/system -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/driver -I /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/include/mbedtls -L/home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/sdk/lib -ltuya_iot -pthread -lm -o /home/houyawei/Desktop/work_source/1.0.3_linux-ubuntu-6.2.0_64Bit/ty_iot_wr_qr_sdk_linux-ubuntu-6.2.0_64Bit_1.0.3/output/demo_soc_dev_wired_1.0.0/demo_soc_dev_wired /usr/bin/ld: 找不到 -ltuya_iot collect2: 错误:ld 返回 1 make: *** [Makefile:62:build_app] 错误 1
-
@ChrisW67 I only added all the .h files in the sdk/include directory, and sdk/lib/libtuya_iot.a.
They have other library versions for cross-compilation(https://github.com/TuyaInc/tuya_DeviceOS_SDK/tree/master/IOT Device OS/ty_iot_wr_qr_sdk/1.0.3)
I chose Linux 64 bit, and the program compiled by it runs on this machine