I have not programmed in Visual C++ in over a decade. I need to write a program to talk to an HP DC power source. I am using Visual C++ 2010.
I am using certain functions that are defined in visa.h header file. Even though I believe I have linked the necessary libraries I get an error, for example, " 1>tft.obj : error LNK2019: unresolved external symbol _viClose@4 referenced in function _main"
I have 6 functions with such errors. I am pretty sure that visa.h resides in one of the following visa32.lib, visa64.lib or nivisa64.lib and so I linked them as:
I still get the unresolved external dependencies error. Do I need to declare this function in main even though they are included in the visa.h header file included in the cpp file?
Not sure what I am doing wrong here, can you guys help me with any ideas?
I've never linked that way in VS2010. I ussually right click on my project, then go to Properties > Configuration Properties > Linker > Input > Additional Dependencies. You can add all of the libraries you want there.
If that isn't the problem, then perhaps your libraries are not in the right directory (or not one that VS2010 searches by default). Try entering the full path such as: C:\Program Files\Microsoft Visual Studio 10.0\VC\lib\visa32.lib if you are using the default directory for VS.