问题描述
我正在尝试使用onecoreuap.lib
例如{ $(VC_LibraryPath_VC_x64_OneCore)
而不是C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\lib\onecore\x64
我的代码中有VC_Library_Path
。
当我构建它时,我得到:
我已检查(#include <concrt.h>
),此文件夹不包含C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.27.29110\lib\onecore\x64
,但包含concrt.lib
根据Microsoft文档,此库可用于onecore(IOT)
如何在Windows onecore(IOT)项目中使用concrt.lib
(PPL)库?
解决方法
我可以在文件夹const [getFoodCategoriesFailed,setGetFoodCategoriesFailed] = useState(false);
const getCategories = async (url) => {
const { request } = await requestor.get({ url });
request.then((response) => {
setFoodCategories(response);
setGetFoodCategoriesFailed(false);
}).catch(() => {
setFoodCategories(undefined);
setGetFoodCategoriesFailed(true);
}).finally(() => {
onFoodCategoriesRetrieved(getFoodCategoriesFailed,foodCategories?.food_categories);
});
};
useEffect(() => {
const url = "xyz";
getCategories(url);
},[foodCategories]);
中找到该库。您可以尝试将路径添加到库路径中。如果找不到该文件夹,则我怀疑Visual Studio的安装错误。请参考此主题: