Click here to Skip to main content
14,770,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to build a C++ example program from the Phidgets company website that monitors and logs three devices. Using either VS2017 or VS2019 gives 20 lines of messages similar to this one:
Log_Mul_Phids(C17_9).obj : error LNK2019: unresolved external symbol __imp__Phidget_openWaitForAttachment@8 referenced in function _main
Yesterday I uninstalled and reinstalled both VS2017 and VS2019 and loaded updates to the Phidgets library but for no change. All the other example projects compile/work flawlessly and I am certain that in this project the linker must be losing track of the needed files.
I have Googled at great length for several days but have found no fix. I have certainly learned many other things.
If you can help me I would appreciate it. gmail address

What I have tried:

Yesterday I uninstalled and reinstalled both VS2017 and VS2019 and loaded updates to the Phidgets library but for no change. All the other example projects compile/work flawlessly and I am certain that in this project the linker must be losing track of the needed files.
I have Googled at great length for several days but have found no fix. I have certainly learned many other things
Posted
Updated 31-Mar-20 4:19am
v2

Please, follow the instruction from MSDN: Linker Tools Error LNK2019 | Microsoft Docs[^]
   
Comments
Member 14162950 31-Mar-20 9:48am
   
Thank you, I am very sure that the answer is in this document and I am unsure how to nail down the problem. I think that I must back up and work on another code project for a while. Keith Klein
Did you include the .LIB file in your linker input?
   
Comments
Member 14162950 31-Mar-20 9:58am
   
I think that the .lib file must be a Phidgets file and I have searched the drive for the file needed. I found Phidgets files in several directories and in Additional Include Directories have put C:\Program Files\Phidgets\Phidget22; C:\Windows\SysWOW64;C:\Windows\System32;.
I think that this is a simple problem and I just have missed the answer. Do you have an idea where the .lib file should be?
steveb 31-Mar-20 11:49am
   
.LIB is the file that the 3rd party library provides to you, unless you are expected to build it yourself (most likely the case, because they can't exactly predict what compiler you are using). So probably you need to build the library and include it into your linker

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900