0

我一直在尝试编译一个使用 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},所以我想知道还需要什么才能使其正常工作。

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

谢谢。

4

1 回答 1

2

放:

#include <pcl.h>

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

gcc program.c -lpcl -o program
于 2010-09-22T02:06:08.773 回答