asus/sdk_liteos/platform/os/Huawei_LiteOS/shell/include -I../../../device/hisilicon/hispark_pegasus/sdk_liteos/platform/os/Huawei_LiteOS/net/telnet/include -Os -mabi=ilp32 -falign-functions=2 -msave-restore -fno-optimize-strlen -freorder-blocks-algorithm=simple -fno-schedule-insns -fno-inline-small-functions -fno-inline-functions-called-once -mtune=size -mno-small-data-limit=0 -fno-aggressive-loop-optimizations -std=c99 -Wpointer-arith -Wstrict-prototypes -ffunction-sections -fdata-sections -fno-exceptions -fno-short-enums -Wextra -Wundef -U PRODUCT_CFG_BUILD_TIME -DLOS_COMPILE_LDM -DPRODUCT_USR_SOFT_VER_STR=None -DCYGPKG_POSIX_SIGNALS -D__ECOS__ -D__RTOS_ -DPRODUCT_CFG_HAVE_FEATURE_SYS_ERR_INFO -D__LITEOS__ -DLIB_CONFIGURABLE -DLOSCFG_SHELL -DLOSCFG_CACHE_STATICS -DCUSTOM_AT_COMMAND -DLOS_COMPILE_LDM -DLOS_CONFIG_IPERF3 -DCMSIS_OS_VER=2 -DSECUREC_ENABLE_SCANF_FILE=0 -DCONFIG_AT_COMMAND -DPRODUCT_CFG_CHIP_VER_STR=Hi3861V100 -DCHIP_VER_Hi3861 -DPRODUCT_CFG_SOFT_VER_STR=Hi3861 -DHI_BOARD_ASIC -DHI_ON_FLASH -DLITEOS_WIFI_IOT_VERSION -march=rv32imac -nostdlib -fno-common -fno-builtin -fno-strict-aliasing -Wall -fsigned-char -fstack-protector-all -std=c99 -c ../../../applications/sample/wifi-iot/app/wifi_connect_demo/wifi_connect_demo.c -o obj/applications/sample/wifi-iot/app/wifi_connect_demo/libwifi_connect_demo.wifi_connect_demo.o [OHOS ERROR] ../../../applications/sample/wifi-iot/app/wifi_connect_demo/wifi_connect_demo.c:36:10: fatal error: wifi_device.h: No such file or directory
********************************************************************* * Looking for wifi_device.h dependency? Check our library registry! * * CLI ?> platformio lib search "header:wifi_device.h" * Web ?> https://platformio.org/lib/search?query=header:wifi_device.h * *********************************************************************
[OHOS ERROR] ?#include "wifi_device.h" [OHOS ERROR] ? ? ? ? ? ^~~~~~~~~~~~~~~ [OHOS ERROR] compilation terminated. [OHOS ERROR] you can check build log in F:\code-2.0-canary\out\hispark_pegasus\wifiiot_hispark_pegasus\build.log [OHOS ERROR] command: "F:\ninja_win\ninja.exe -w dupbuild=warn -C F:\code-2.0-canary\out\hispark_pegasus\wifiiot_hispark_pegasus" failed [OHOS ERROR] return code: 1 [OHOS ERROR] execution path: F:\code-2.0-canary *** [out\hispark_pegasus\wifiiot_hispark_pegasus\Hi3861_wifiiot_app.out] Error -1 ================================================================== [FAILED] Took 7.61 seconds ================================================================== 终端进程“c:\users\txwtech\.deveco-device-tool\core\deveco-venv\scripts\hos.exe 'run', '--project-dir', 'F:\code-2.0-canary', '--environment', 'hi3861'”已终止,退出代码: 1。
解决方法:
build.gn中添加这条:
?"//foundation/communication/wifi_lite/interfaces/wifiservice"
# Copyright (c) 2020, HiHope Community.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
static_library("wifi_connect_demo") {
sources = [
"wifi_connect_demo.c",
]
include_dirs = [
"//utils/native/lite/include",
"//kernel/liteos_m/components/cmsis/2.0",
"//base/iot_hardware/interfaces/kits/wifiiot_lite",
"//foundation/communication/interfaces/kits/wifi_lite/wifiservice",
"//vendor/hisi/hi3861/hi3861/third_party/lwip_sack/include/",
"//foundation/communication/wifi_lite/interfaces/wifiservice"
# "//device/hisilicon/hispark_pegasus/sdk_liteos/third_party/lwip_sack/include",
# "F:/third_party/lwip/src/include",
]
}
|