开发者

Converting C source code to a DLL results in "unresolved externals"

I am trying to run the code which is written using C and that is for a dialogic board dmv 960A 4T1pci. I am trying to convert that code to a DLL but I am facing 34 errors which are almost same , here is the list of them:

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__g开发者_JAVA百科ethostname@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.


Update

It appears you are using the following library:

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

Ensure that you are linking to the appropriate library object for your platform, as mentioned here in another answer. There is a linux version, a windows version, and a jar for java dev. Ensure you have included the right one in your linker settings. For example, here is how we would do this in eclipse.

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

Original Answer*

"unresolved external symbol" would suggest that in your project you're requiring and or using classes linked to some library that you are not properly including in your project. Whatever IDE you're using OR in your makefiles, ensure that you have properly included any library files required for your project.


It seems you are not using the correct compiler. A DLL should only work on windows based systems and it seems that the compiler cannot find the methods and constants that are available on the board you are working with.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜