From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Visa, BorladC++ Builder3.1, linking errors

I have linking error, then building my program written in BorlandC++ Builder3.1
(program has no compiling errors)

I need to use header in my program.
It was installed in C:\VXIpnp\Win95\include directory.

I have 2 linking errors:
Undefined symbol _viClose in module
Undefined symbol _viOpen in module

I copied all VISA (driver from National Insruments (www.ni.com), i use it to communicate with serial port RS232)
so I copied all VISA files from C:\VXIpnp\Win95 to C:\BorlandC dirctory ("include" ant "lib" folders respectively)
errors persist.

In BorlandC++ Options>>Directories i wrote paths to library and to include in C:\VXIpnp\Win95.
errors persist.

I also tried with following
3 programs:
1) BorlandC++ Builder 6 (evaluation version)
2) Icc – win32 (free) and
3) SoftIntegration Ch 4.5 standart (free)
They all throwed the same error messages:
Undefined symbol _viClose in module
Undefined symbol _viOpen in module

ViClose and viOpen are defined in hereby:

72) ViStatus _VI_FUNC viOpenDefaultRM (ViPsession vi);
83) ViStatus _VI_FUNC ViClose (ViObject vi);

I opened visatype.h to fined out how ViStatus....are defined and made table:
Are _VI_FUNC and VIPSession defined correctly?
(Because there is no such variable as ViPtr and VISAFN in BorlandC.)

If they are not how must i define them?
I attached visa.h and visatype.h and table for convenience.

Thanks in advise
Gintare
Download All
0 Kudos
Message 1 of 4
(3,514 Views)
Are you linking against C:\VXIpnp\Win95\lib\bc\visa32.lib? If not, do so and that should solve your problems.

If you are trying to link with that library, and it's not working, perhaps you'll need to create your own import library based on visa32.dll. We haven't changed the Borland import library in awhile, and I don't know if it's still compatible with the latest versions of the Borland products.

Dan Mondrik
National Instruments
0 Kudos
Message 2 of 4
(3,514 Views)
Yes, i`m linking as you wrote.
How could i create this import library?

Gintare
0 Kudos
Message 3 of 4
(3,513 Views)
From what I have heard, there are a few different compile options that change how the symbol files should look. One option should allow you to enable/disable C++ name-mangling. I would try changing this setting, because it defines how the symbols look in the library file.

JoshuaP
0 Kudos
Message 4 of 4
(3,514 Views)