gpt4 book ai didi

将 C 源代码转换为 DLL 结果为 "unresolved externals"

转载 作者:太空宇宙 更新时间:2023-11-04 06:08:00 25 4
gpt4 key购买 nike

我正在尝试运行使用 C 编写的代码,该代码用于对话板 dmv 960A 4T1pci。我正在尝试将该代码转换为 DLL,但我遇到了 34 个几乎相同的错误,这是它们的列表:

Linking...
Creating library Debug/drivendll.lib and object Debug/drivendll.exp
drivendll.obj : error LNK2001: unresolved external symbol _sr_waitevt
drivendll.obj : error LNK2001: unresolved external symbol _gc_CCLibStatusEx
drivendll.obj : error LNK2001: unresolved external symbol _gc_Start
drivendll.obj : error LNK2001: unresolved external symbol _sr_setparm
drivendll.obj : error LNK2001: unresolved external symbol _gc_DropCall
drivendll.obj : error LNK2001: unresolved external symbol _gc_WaitCall
drivendll.obj : error LNK2001: unresolved external symbol _gc_ResetLineDev
drivendll.obj : error LNK2001: unresolved external symbol _gc_Close
drivendll.obj : error LNK2001: unresolved external symbol _gc_ResultInfo
drivendll.obj : error LNK2001: unresolved external symbol _gc_util_delete_parm_blk
drivendll.obj : error LNK2001: unresolved external symbol _gc_SetUserInfo
drivendll.obj : error LNK2001: unresolved external symbol _gc_util_insert_parm_val
drivendll.obj : error LNK2001: unresolved external symbol _gc_GetMetaEvent
drivendll.obj : error LNK2001: unresolved external symbol _gc_AlarmSourceObjectName
drivendll.obj : error LNK2001: unresolved external symbol _gc_AlarmSourceObjectID
drivendll.obj : error LNK2001: unresolved external symbol _gc_AlarmName
drivendll.obj : error LNK2001: unresolved external symbol _gc_AlarmNumber
drivendll.obj : error LNK2001: unresolved external symbol _gc_ReleaseCallEx
drivendll.obj : error LNK2001: unresolved external symbol _gc_AnswerCall
drivendll.obj : error LNK2001: unresolved external symbol _gc_AcceptCall
drivendll.obj : error LNK2001: unresolved external symbol _gc_GetCallInfo
drivendll.obj : error LNK2001: unresolved external symbol _gc_SetAlarmNotifyAll
drivendll.obj : error LNK2001: unresolved external symbol _gc_GetResourceH
drivendll.obj : error LNK2001: unresolved external symbol _gc_MakeCall
drivendll.obj : error LNK2001: unresolved external symbol _gc_OpenEx
drivendll.obj : error LNK2001: unresolved external symbol _gc_LoadDxParm
drivendll.obj : error LNK2001: unresolved external symbol __imp__inet_ntoa@4
drivendll.obj : error LNK2001: unresolved external symbol __imp__gethostbyname@4
drivendll.obj : error LNK2001: unresolved external symbol __imp__gethostname@8
drivendll.obj : error LNK2001: unresolved external symbol _gc_util_insert_parm_ref
drivendll.obj : error LNK2001: unresolved external symbol _gc_SetCallingNum
drivendll.obj : error LNK2001: unresolved external symbol _gc_ErrorInfo
drivendll.obj : error LNK2001: unresolved external symbol _gc_Stop
Debug/drivendll.dll : fatal error LNK1120: 33 unresolved externals
Error executing link.exe.

最佳答案

更新

看来您正在使用以下库:

http://threebit.net/projects/jvr/download/

确保您链接到适合您平台的库对象,如另一个答案中所述。有一个linux版本,一个windows版本,还有一个java dev的jar。确保您在链接器设置中包含了正确的设置。例如,这是我们在 eclipse 中执行此操作的方法。

http://wiki.eclipse.org/CDT/User/FAQ#How_do_I_add_an_external_library_to_my_C.2B.2B_project.3F

原始答案*

“未解析的外部符号”表示在您的项目中您需要和/或使用链接到您未正确包含在项目中的某些库的类。无论您在 makefile 中使用或使用哪种 IDE,请确保您已正确包含项目所需的所有库文件。

关于将 C 源代码转换为 DLL 结果为 "unresolved externals",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5779034/

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