Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Visual C or C# Express 2010

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

0 Kudos
Message 1 of 6
(5,960 Views)

Hey Boematic, 

 

Have you tried to perform this same linking process with other examples from LabVIEW?

 

Kyle K.

Product Manager for Product Data
National Instruments
0 Kudos
Message 2 of 6
(5,941 Views)

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.

0 Kudos
Message 3 of 6
(5,938 Views)

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

---
Brad Keryan
NI R&D
0 Kudos
Message 4 of 6
(5,918 Views)

I also need this information for my work. Thanks.

0 Kudos
Message 5 of 6
(5,876 Views)
Hi glinskin,

Did the manual page that I linked in my previous reply have the information you need?

Brad
---
Brad Keryan
NI R&D
0 Kudos
Message 6 of 6
(5,872 Views)