-2

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__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.
halfer
  • 19,824
  • 17
  • 99
  • 186
  • 1
    And in case anyone else was curious (though an eBay) the `dmv 960A 4T1pci` is a PC board: http://cgi.ebay.com/Dialogic-DM-V960A-4T1-PCI-U-DMV960A-4T1PCI-Universal-/170624417784 – Brad Christie Apr 25 '11 at 14:00
  • Does this answer your question? [What is an undefined reference/unresolved external symbol error and how do I fix it?](https://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix) – Ken White Dec 10 '19 at 00:05

2 Answers2

4

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.

1

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.

Dhaivat Pandya
  • 6,499
  • 4
  • 29
  • 43
  • I am using the VC++ 6.0 in which the original C code was developed... and i have all the files inclusive of the header files and all.Can you tell me what exactly the issue is there because of which this error is there? – rahul sharma Apr 25 '11 at 14:21
  • @rahul I posted an answer with precise details on how to fix the issue. As you can see, my answer has been upvoted a few times now, which should be a clear indication that I've said something at least on the right track. You know the saying, where theres smoke theres fire? Here is how to include libraries in Visual C++ http://www.tek-tips.com/viewthread.cfm?qid=1454100&page=12 –  Apr 25 '11 at 14:42
  • Also I only upvoted this answer because of the "compiler cannot find the methods and constants that are available" portion. The "wrong compiler" is not necessarily true. It appears more likely that you simply have not correctly linked to the library. –  Apr 25 '11 at 14:44
  • Ok, and what library should i attach there, the VC++ ones or the dialogic ones?] – rahul sharma Apr 25 '11 at 14:50
  • ....... there is a DLL contained within the source package you downloaded, under lib. Include it in your project. –  Apr 25 '11 at 15:34