LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI with real stdio using external compiler

I have a simple problem I wish to write a comand line CVI program that used stdio. The CVI compiler puts the stdio in a window.

I have tryed to use the borland compiler and CVI libraries. but am having trouble at the link stage. The CVI Programmer reference manual mentions this problem (page 3-17) it says turn off incremental linker option).

Can any one tell me how I should link?

Thanks Richard
0 Kudos
Message 1 of 8
(3,870 Views)
If you have CVI 5.5, you can build command line programs. If you are using a previous version, you can't do it. In 5.5, go to Build->Target Settings... and check Create Console Application.

Best Regards,

Chris Matthews
Measurement Studio Support Manager
0 Kudos
Message 2 of 8
(3,870 Views)
Ok but if I do not have CVI 5.5, can I use borland C++ 5.4
0 Kudos
Message 3 of 8
(3,870 Views)
Not with CVI's ANSI C library. It uses the STDIO for standard I/O functions. You would have to take out CVI's #include statements and add ones for Borland ANSI C libraries. You could still link in our external libraries though.
0 Kudos
Message 4 of 8
(3,870 Views)
I get the following error when I link in the CVI stuff, the book also says dont use the incremental linker. So should I link it.

Turbo Incremental Link 4.00 Copyright (c) 1997, 1999 Inprise Corporation
Error: 'C:\CVI\EXTLIB\CVIRT.LIB' contains invalid OMF record, type 0x21 (possibly COFF)
0 Kudos
Message 5 of 8
(3,870 Views)
No, you shouldn't link the CVIRT.LIB. You can link the other files in extlib, but you should use the Borland libraries for our CVIRT stuff.
0 Kudos
Message 6 of 8
(3,870 Views)
removed CVIRT.LIB

Error: 'C:\CVI\EXTLIB\EASYIO.LIB' contains invalid OMF record, type 0x21 (possibly COFF)

The CVI book says dont use incremental linker
It does not say what I should use.
Can you help.
0 Kudos
Message 7 of 8
(3,870 Views)
Make sure you've got CVI installed in the right
compatibility mode on your machine. Open CVI and from the
project window select the Build Options dialog in the
Options menu. One of the fields in that dialog is the
compatibility mode. If it's not borland, you have to run
the CVI installer again and change compatibility modes.
This'll copy the correct versions of cvirt.lib etc into your
c:\cvi\extlib folder. Judging from your problems, you've
probably got CVI installed in MSVC mode.

If you're using functions from CVI in your borland program
you have to link to cvirt.lib eg. if you're using the CVI
user interface library.

Also, you shouldn't have to change #includes in your program
as long as you _don't_ incl
ude c:\cvi\include\ansi in your
search path in the borland IDE.

Hope this helps,

Peter

deli writes:
> removed CVIRT.LIB
>
> Error: 'C:\CVI\EXTLIB\EASYIO.LIB' contains invalid OMF record, type
> 0x21 (possibly COFF)
>
> The CVI book says dont use incremental linker
> It does not say what I should use.
> Can you help.

-- Peter Ilberg
0 Kudos
Message 8 of 8
(3,870 Views)