xilinx vitis2022.2版本在windows下链接CMSISDSP库,在编译的时候出现了库函数头文件重复定义的情况,删除定义后,错误显示查找不到函数。
以下是显示重复定义:
src\Include/dsp/none.h:263:33: error: redefinition of '__QSUB8'
263 | __STATIC_FORCEINLINE uint32_t __QSUB8(
In file included from D:\workspace_ARM\FFT\FFT_test_demo\src\Include/cmsis_compiler.h:54,
from D:\workspace_ARM\FFT\FFT_test_demo\src\Include/arm_math_types.h:104,
from D:\workspace_ARM\FFT\FFT_test_demo\src\Include/arm_math_memory.h:30,
from D:\workspace_ARM\FFT\FFT_test_demo\src\Include/dsp/window_functions.h:31,
from ../src/Source/WindowFunctions/arm_hanning_f32.c:29:
以下是显示找不到函数:
D:\workspace_ARM\phase\phase_test_demo\Debug/../src/helloworld.c:77: undefined reference to arm_cfft_sR_f32_len256' d:/xilinx/vitis/2022.2/gnu/aarch64/nt/aarch64-none/x86_64-oesdk-mingw32/usr/bin/aarch64-xilinx-elf/../../libexec/aarch64-xilinx-elf/gcc/aarch64-xilinx-elf/11.2.0/real-ld.exe: D:\workspace_ARM\phase\phase_test_demo\Debug/../src/helloworld.c:77: undefined reference to arm_cfft_sR_f32_len256'
xilinx vitis2022.2版本在windows下链接CMSISDSP库
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
3条回答 默认 最新
阿里嘎多学长 2025-02-14 11:23关注阿里嘎多学长整理AIGC生成,因移动端显示问题导致当前答案未能完全显示,请使用PC端查看更加详细的解答过程
问题解答
Xilinx Vitis 2022.2 版本在 Windows 下链接 CMSISDSP 库时出现了库函数头文件重复定义的情况。
解决方案:
- 检查 CMSISDSP 库的安装路径是否正确。如果 CMSISDSP 库安装在多个路径下,可能会导致重复定义的情况。
- 在 Vitis 项目中,删除 CMSISDSP 库的重复定义。可以在
Project Settings->Build Options->Include Paths中删除重复的路径。 - 在
Project Settings->Build Options->Library Paths中添加 CMSISDSP 库的路径,以便 Vitis 可以正确地链接库。 - 如果问题仍然存在,可以尝试使用
#include指令手动包含 CMSISDSP 库的头文件,以避免重复定义。
例如:
#include "CMSISDSP.h"- 如果问题仍然存在,可以尝试使用
#pragma once指令在头文件中添加,以避免重复定义。
例如:
#pragma once #include "CMSISDSP.h"通过以上步骤,您应该能够解决 CMSISDSP 库的重复定义问题,并正确地链接 CMSISDSP 库。
解决 无用评论 打赏 举报