visual c++ and spatial

C, C++, and Visual C++
Post Reply
viccos
Phidgetsian
Posts: 13
Joined: Wed Feb 15, 2012 6:52 am
Contact:

visual c++ and spatial

Post 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...
fraser
Engineering
Posts: 324
Joined: Thu Nov 19, 2009 4:41 pm
Contact:

Re: visual c++ and spatial

Post 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.
viccos
Phidgetsian
Posts: 13
Joined: Wed Feb 15, 2012 6:52 am
Contact:

Re: visual c++ and spatial

Post 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
mphi
Phidgetly
Posts: 39
Joined: Tue Nov 16, 2010 4:27 pm
Contact:

Re: visual c++ and spatial

Post 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.
viccos
Phidgetsian
Posts: 13
Joined: Wed Feb 15, 2012 6:52 am
Contact:

Re: visual c++ and spatial

Post by viccos »

Thanks... Last instructions did solve my problem... Thank you so much...
User avatar
burley
Human-Cyborg Relations
Posts: 442
Joined: Tue Sep 27, 2011 2:37 pm
Location: Calgary
Contact:

Re: visual c++ and spatial

Post 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.
Brian Burley
403-282-7335 ext. 6003
support@phidgets.com
fraser
Engineering
Posts: 324
Joined: Thu Nov 19, 2009 4:41 pm
Contact:

Re: visual c++ and spatial

Post 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++.
jackiejacks
Fresh meat
Posts: 1
Joined: Fri Mar 31, 2017 7:17 am
Contact:

Re: visual c++ and spatial

Post 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!
Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests