简体   繁体   English

未解决的外部符号编译错误

[英]unresolved external symbol compile error

I frequently have this problem when I try a new library. 当我尝试新的库时,我经常遇到这个问题。 This time I work with PointGrey Camera and try to use its API libraries (some dll, lib, header files). 这次,我使用PointGrey Camera,尝试使用其API库(一些dll,lib,头文件)。 Mostly, problems were fixed by configuring the SDK (I'm using VS2008) Tools/Options/VC++ Directories/include files(/library files)(/executable files), 通常,通过配置SDK(我正在使用VS2008),工具/选项/ VC ++目录/包含文件(/库文件)(/可执行文件)来解决问题,
I also tried with project configuration: + project properties/linker/input/additional dependencies + project properties/linker/General/Additional Library Directories 我还尝试了项目配置:+项目属性/链接器/输入/其他依赖项+项目属性/链接器/常规/其他库目录

This time, with all this, I still have the error. 这次,尽管如此,我仍然有错误。

Is there a general method to deal with this problem? 是否有解决此问题的一般方法?

do I need to understand this diagnosis from VS2008? 我需要从VS2008了解此诊断吗?

Error   1   error LNK2019: unresolved external symbol __imp__flycaptureGetPacketInfo referenced in function "enum FlyCaptureError __cdecl initializeStandardEventSizes(void *,struct FlyCaptureImageEvent * const)" (?initializeStandardEventSizes@@YA?AW4FlyCaptureError@@PAXQAUFlyCaptureImageEvent@@@Z)  main_2.obj  test

does using analysis tool such as Dependencies Walker ensure to solve these problems well?? 使用诸如Dependencies Walker之类的分析工具是否可以确保很好地解决这些问题?

This message says that you used a symbol (a function or a variable) in your code. 此消息表明您在代码中使用了符号(函数或变量)。 This symbol was probably declared somewhere (most likely in a header file you included in your code) otherwise there would have been a compilation error. 该符号可能已声明在某个位置(很可能在代码中包含的头文件中),否则会出现编译错误。 When the linker searched for the symbol (in both your object files and the lib files you instructed it to look in) it couldn't find it. 当链接程序搜索符号时(在您指示它进入的目标文件和lib文件中),找不到该符号。

That usually happens because you forgot to let the linker know about a lib you want it to search in. 发生这种情况通常是因为您忘记让链接器知道您要搜索的库。

Most libraries come with a set of instruction that is supposed to help you set up everything correctly and avoid running into these problems. 大多数库带有一组指令,可以帮助您正确设置所有内容并避免遇到这些问题。

This problem has been solved lately. 这个问题最近已经解决了。 I installed the incompatible library of PointGrey. 我安装了不兼容的PointGrey库。 That's why it didn't work. 这就是为什么它不起作用。 But this says something between "incompatible library" and "unresolved exertal symbol error" 但这表示“不兼容的库”和“无法解决的劳累性符号错误”之间的某种关系

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM