LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

using cvi files as C files

Hello Forum,

 

Am given cvi files that include a .c, .h, .prj, .uir files. i donot have labview in my machine nor have i ever used it.

Can you pls let me know how i can use the cvi C file as a normal c source code?

do i need anything else?

I tried to compile it using VC++ IDE. When it asked for files like ansi_c.h, utility.h, userint.h, cvirte.h, cvidef.h i added them to the VC98/INCLUDE. The project file compiles without error but it fail to build exe giving fatal errors while linking.

here is the output of the build.

 

--------------------Configuration: codetest - Win32 Debug--------------------
Compiling...
code.c

code.obj - 0 error(s), 0 warning(s)

--------------------Configuration: codetest - Win32 Debug--------------------
Linking...
code.obj : error LNK2001: unresolved external symbol _SplitPath@16
Debug/codetest.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Creating browse info file...

codetest.exe - 2 error(s), 0 warning(s)

Request you to help me with getting the file compile and builT so that i can use the exe to run from VB.

I will be v grateful to you if you can get me going with this. Is there anything wrong with my approach of using the CVI files as C file.

I have opted for this only after going thru the discussion in the forum.

 

thanks n regards.

0 Kudos
Message 1 of 2
(3,148 Views)
I would suggest you open the CVI help and search for the topic Building a Project in an External Compiler. This topic gives step by step instructions on how to set up your VC project.  Note that your linker error is for a function which is part of the CVI runtime engine.  As the help topic notes, you'll have to specify cvirt.lib as a linker input to successfully link any of the runtime engine functions.

Hope this helps.

Mert A.
National Instruments
0 Kudos
Message 2 of 2
(3,121 Views)