喜欢 VS2013 的 Win32 dll 上的库的麻烦

Troubles liking libraries on a Win32 dll for VS2013

本文关键字:麻烦 Win32 VS2013 喜欢 dll      更新时间:2023-10-16

我在链接我的库以便在VS2013上制作dll时遇到问题。我不得不说,由于winapifamily的一些麻烦,我需要一个桌面dll,所以这是一个Win32项目,我想这可能也是一个问题,但到目前为止我没有更好的解决方案。我得到的一些错误:

error LNK2001: unresolved external symbol __imp_NuiCreateSensorByIndex
error LNK2001: unresolved external symbol __imp_NuiSetDeviceStatusCallback
error LNK2001: unresolved external symbol __imp_NuiGetSensorCount
error LNK2001: unresolved external symbol "void __cdecl pcl::console::print(enum pcl::console::VERBOSITY_LEVEL,char const *,...)" (?print@console@pcl@@YAXW4VERBOSITY_LEVEL@12@PEBDZZ)
error LNK2001: unresolved external symbol "protected: bool __cdecl pcl::PCLBase<struct pcl::PointXYZ>::deinitCompute(void)" (?deinitCompute@?$PCLBase@UPointXYZ@pcl@@@pcl@@IEAA_NXZ)
error LNK2001: unresolved external symbol "protected: bool __cdecl pcl::PCLBase<struct pcl::PointXYZ>::initCompute(void)" (?initCompute@?$PCLBase@UPointXYZ@pcl@@@pcl@@IEAA_NXZ)

谢谢。

如果要

包含外部资源,则需要将它们显式馈送到链接器中或将它们作为动态库引用(显式或隐式)

这个答案显示了几个很好的步骤: https://stackoverflow.com/a/20410798/351861