0

I am trying to compile/build a C++ example program from the Phidgets company website. The program 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

I have (Googled), read and tried a number of fixes. Yesterday I uninstalled and reinstalled both VS2017 and VS2019 and loaded updates to the Phidgets library. 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 also visited many technical forums and studied linker structure. I have certainly learned many other things.

Ten years ago I constructed a solar tracking system and used the devices available at that time. I am in the process of completing a more versatile machine and desire to use the more sophisticated devices now supplied by Phidgets. The support people at Phidgets have been helpful in getting me this far along and I would recommend that if you need a control system that you check them out.

If you can help me I would appreciate it.

1201ProgramAlarm
  • 32,384
  • 7
  • 42
  • 56
  • It seems like you're not including the proper Phidgets library (.LIB) file. – 1201ProgramAlarm Mar 31 '20 at 00:46
  • Thank you. I have added under Additional Include Directories the C:\Program Files\Phidgets\Phidget22 but off of this directory there is a sub directory called X86. In the "base: Phidgets22 directory is a Phidgets22.lib and another is in the x86 directory. I suspect that I need to study which I need and make sure to pin point which is used by VS2019. I do not really understand if I should set debug to x86 or 64 so I need to study this first. Thank you again. – klein_keith Mar 31 '20 at 14:44
  • The project now builds and executes. I deleted the files in the X86 directory and added the other .lib to under the .cpp file in the solution. I have more to learn but now can move on. Thanks again/. – klein_keith Mar 31 '20 at 16:20

0 Answers0