12-20-2011 03:54 PM
I am working on a Win7 x64 system with VC++ 2010 Express (or VC# 2010 Express) and I can't get any of the examples to link. For instance I've taken the niSwitchMakingConnectionsOnASwitch example and put in the include directories and library paths as instructed in the NI-Switch Help but it won't link. I am getting unresolved external symbol errors:
1>niSwitchErrorHandler.obj : error LNK2019: unresolved external symbol _niSwitch_GetError@16 referenced in function _niSwitch_ErrorHandler
1>niSwitchMakingConnectionsOnASwitch.obj : error LNK2019: unresolved external symbol _niSwitch_close@4 referenced in function _main
1>niSwitchMakingConnectionsOnASwitch.obj : error LNK2019: unresolved external symbol _niSwitch_WaitForDebounce@8 referenced in function _main
1>niSwitchMakingConnectionsOnASwitch.obj : error LNK2019: unresolved external symbol _niSwitch_Connect@12 referenced in function _main
1>niSwitchMakingConnectionsOnASwitch.obj : error LNK2019: unresolved external symbol _niSwitch_InitWithTopology@20 referenced in function _main
I get this no matter what paths I have in the "Additional Library Directories" in my Project->Linker->General options. What library paths do I need to include for a x64 machine? There seems to be several \msc folders in \Program Files and \Program Files (x86) but none of the paths resolve my conflicts.
Thanks in advance.
Boe
12-21-2011 03:28 PM
Hey Boematic,
Have you tried to perform this same linking process with other examples from LabVIEW?
Kyle K.
12-21-2011 04:53 PM
No I haven't tried any of the other examples.
I found some C# code that I've been able to modify and get working. I would have preferred to use C++ but this will do.
Regards.
01-13-2012 05:07 PM
Hi Boe,
Did you tell Visual C to link against the import library? Setting the library directory is not enough. See http://zone.ni.com/reference/en-XX/help/370388Y-01/switch/niswitch_c/
Brad
02-04-2012 12:24 PM
I also need this information for my work. Thanks.
02-04-2012 03:29 PM