gpt4 book ai didi

c - C 中未声明的标识符

转载 作者:太空宇宙 更新时间:2023-11-04 09:56:31 24 4
gpt4 key购买 nike

我一直在尝试编译一个使用 PCL 的程序。但是,我不断收到此错误:

test.c:23: error: ‘PCL_CNT_TYPE’ undeclared (first use in this function)
test.c:23: error: (Each undeclared identifier is reported only once
test.c:23: error: for each function it appears in.)
test.c:23: error: expected ‘;’ before ‘i_result_list1’
test.c:24: error: ‘PCL_FP_CNT_TYPE’ undeclared (first use in this function)
test.c:24: error: expected ‘;’ before ‘fp_result_list1’
test.c:27: error: ‘PCL_L1DCACHE_MISS’ undeclared (first use in this function)
test.c:28: error: ‘PCL_L2CACHE_MISS’ undeclared (first use in this function)
test.c:30: error: ‘PCL_MODE_USER’ undeclared (first use in this function)
test.c:33: error: ‘PCL_SUCCESS’ undeclared (first use in this function)
test.c:47: error: ‘i_result_list2’ undeclared (first use in this function)
test.c:47: error: ‘fp_result_list2’ undeclared (first use in this function)

有什么想法吗?

我的机器上安装了 libpcl1{-dev},所以我想知道还需要什么才能让它工作。

如果您需要更多信息,请告诉我。

谢谢。

最佳答案

放:

#include <pcl.h>

在文件的顶部。链接时您还需要 -lpcl。例如:

gcc program.c -lpcl -o program

关于c - C 中未声明的标识符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3765772/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com