Page 1 of 1

visual c++ and spatial

Posted: Wed Feb 15, 2012 8:28 am
by viccos
After trying to buil in Microsoft Visual c++ Express the spatial-simple project included in the phidget sample programs, I get the a bunch of errors like this one:

I Spatial-simple.obj : error LNK2019: unresolved external symbol __imp__CPhidget_getSerialNumber@8 referenced in function _AttachHandler@8

I followed the settings in the Getting started with Phidgets in Microsoft Visual Studio C\C++

IS there something I missed?

Regards....

Victor...

Re: visual c++ and spatial

Posted: Wed Feb 15, 2012 10:25 am
by fraser
someone else had this problem as well, so I just went to look and I am getting the same errors. there appears to be a problem with the 64 bit phidget21.lib. If you are running a 64 bit machine (guessing that you are), if you go into Project->Properties->Linker->Input and change the Additional Dependencies entry to

"$(SystemDrive)\Program Files\Phidgets\x86\phidget21.lib"
...
this will reference the x86 library file instead. You can use this as a temporary fix until we solve the x64 library issue.

Re: visual c++ and spatial

Posted: Wed Feb 15, 2012 10:58 am
by viccos
Sorry... I already solved that part....

In the Phidgets getting started manual is not specified the directory changes when you install windows ins spanish. The directory is called Archivos de Programa instead of program files.

However, after solving that, I am still getting un error. fatal error C1083: Cannot open include file: 'phidget21.h': No such file or directory

Even if I include that file in the header file I get the same error. I dont know if it should be included somehow in the external dependencies, in the source files, in the headers or anyware else. I included the 'phidget21.h' file in the header, and after in the source file, but I am getting the same error still...

Could you help me out with this one?
Thanks

Re: visual c++ and spatial

Posted: Wed Feb 15, 2012 1:00 pm
by mphi
Open the project properties window and navigate to Configuration Properties → C/C++. Add "$(SystemDrive)\Program Files\Phidgets" to the additional directories field, or which ever directory you install the Phidgets driver to.

Re: visual c++ and spatial

Posted: Wed Feb 15, 2012 2:23 pm
by viccos
Thanks... Last instructions did solve my problem... Thank you so much...

Re: visual c++ and spatial

Posted: Thu Feb 16, 2012 11:27 am
by burley
You will need to change some project settings in order to accommodate x64 libraries.

When in visual studio, in the top middle click on the Win32 drop-down menu and select the configuration manager. Find the active project and under the platform option, select New... (if it appears select x64 instead. Then you are done) In the new pane that appears under the "New Platform" option select x64. Click Ok. You should now be able to use the 64 bit .lib file.

Re: visual c++ and spatial

Posted: Thu Feb 16, 2012 12:02 pm
by fraser
for anyone else having this issue, if the x64 option doesn't show up in the configuration manager, it is because Visual Studio will by default not install the C++ x64 compiler tools. To fix this, you need to go into your Windows Programs and Features, click Unintsall/Change on Visual Studio 2005, and select the Modify/Add Features option. Then under the C/C++ list, check the box next to the x64 option, and click Next. Finish the installation and the x64 option will now be available for C/C++.

Re: visual c++ and spatial

Posted: Fri Mar 31, 2017 7:20 am
by jackiejacks
@burley

I am also having a similar issue and getting an error as follows in VS2012.

InterfaceKit-simple.obj : error LNK2019: unresolved external symbol _OffsetTime referenced in function _interfacekit_simple


i have added the things stated by others but still no help. Can you please help me?

Thanks!