LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

question to link static library created by VC++6.0 to LabWindows/CVI

Hi,
I have one static library dbs32.lib created by VC++6.0. I added this library
to the project list on the Project Window. After build, I always got the
link errors, said that _read, _write, _fileno, __iob, __filbuf, __flsbuf
are undefined symbol.

Do you have idea where the problem are?

Thanks
Allyson
0 Kudos
Message 1 of 3
(3,668 Views)
Hello Allyson,

Your static library was build using VC++'s include files. For example,
the three standard streams in C stdin, stdout, stderr are implemented
as macros referencing _iob[0], _iob[1], and _iob[2] inside the VC++
runtime libraries. CVI implements these streams in a different way so
it doesn't know about _iob.

If you have built dbs32.lib yourself you can try rebuilding it, but
use the CVI ANSI include files. Add \include\ansi,
\include, and \sdk\include
to the include path in your project in front of the VC++ include
directory. You can do this in VC++ in Project > Settings > C/C++ >
Category: Preprocessor > Additional include directories.

Unfortunately, this'll break the library for VC++ and you won
't be
able to use it there unless you also link to cvirt.lib and
cvisupp.lib in \extlib.

The programmer's reference manual contains a section about "Creating
Object and Library Files in External Compilers for Use in
LabWindows/CVI" on page 3-18.

Hope this helps,

Peter

"Allyson Wu" writes:
> Hi,
> I have one static library dbs32.lib created by VC++6.0. I added this library
> to the project list on the Project Window. After build, I always got the
> link errors, said that _read, _write, _fileno, __iob, __filbuf, __flsbuf
> are undefined symbol.
>
> Do you have idea where the problem are?
>
> Thanks
> Allyson
0 Kudos
Message 2 of 3
(3,668 Views)
I have the same problem!Cvi can't find math's functions!

link errors, said that _cos, _sinus, _fabs...>> are undefined symbol.>>
I have implemented math.h as includefile in vc++! Do you have any hint why
cvi cannot find math functions (all the other functions work fine!!!!!)

Thanks for your help!
chris


peter.ilberg@ni.com wrote:
>>Hello Allyson,>>Your static library was build using VC++'s include files.
For example,>the three standard streams in C stdin, stdout, stderr are implemented>as
macros referencing _iob[0], _iob[1], and _iob[2] inside the VC++>runtime
libraries. CVI implements these streams in a different way so>it doesn't
know about _iob.>>If you have built dbs32.lib yourself you can try rebuilding
it, but>use the CVI ANSI include files. Add
l-dir>\include\ansi,>\include,
and \sdk\include>to the include path in your project in
front of the VC++ include>directory. You can do this in VC++ in Project >
Settings > C/C++ >>Category: Preprocessor > Additional include directories.>>Unfortunately,
this'll break the library for VC++ and you won't be>able to use it there
unless you also link to cvirt.lib and>cvisupp.lib in \extlib.>>The
programmer's reference manual contains a section about "Creating>Object and
Library Files in External Compilers for Use in>LabWindows/CVI" on page 3-18.>>Hope
this helps,>>Peter>>"Allyson Wu" writes:>> Hi, >> I have
one static library dbs32.lib created by VC++6.0. I added this library>>
to the project list on the Project Window. After build, I always got the>>
link errors, said that _read, _write, _fileno, __iob, __filbuf, __flsbuf>>
are undefined symbol.>> >> Do you have idea where the problem are?>> >> Thanks>>
Allyson
0 Kudos
Message 3 of 3
(3,668 Views)