LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to add libraries like tcl(tclsh.lib) at compile time on labview for windows(cvi5.5 version)

to use interface of c with tcl then we require to dynamically mention the libraries to be included for compiling the c file.
Tcl_EvalFile() this is a C tcl interface function.
so if i want to use this functions inside .c file under labWindows/CVI , where do i include the tcl library path to search for this function prototype.
linux : we compile like
cc xx.c -ltcl -ltm
where xx.c is the c file to be compiled
-ltcl is to link tcl library
thanks in advance for the answer.
i find that u can give path only to find *.fp files under labwindows/CVI under
options-->>> libraryoptions
0 Kudos
Message 1 of 6
(5,058 Views)
Hello policharla,
First, to add the function prototypes to your code, you should #include a header file (tcl.h?) near the top of your source. You can set the include file search path from Project Menu >> Options >> "Include Paths...". To link a static library, simply add it to your project by going to Project Menu >> Edit >> Add Files To Project... >> Library (*.lib). Further documentation can be found in the "LabWindows/CVI Programmer Reference Manual" available at \manuals\ProgrRef.pdf or online at http://www.ni.com/manuals. You may also find the DLL examples under \samples\dll useful.

Jeremiah Cox
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 2 of 6
(5,058 Views)
Hi policharla,

Here I have attached an example CVI/Labwindows project that use Tcl/C-API interface.
The all you have to do is to include the tcl.h and tcl.lib into the Project and compile!

Here I have use Tcl_CreateCommand to implement an example C-command that reverses two arguments. But you can also try to, type any TCL command or source the test.tcl script directly from the string window on the User interface.

Regards,
Nikolai
Message 3 of 6
(5,058 Views)
Nikolai,

I downloaded your programmed and successfully compiled it on LW-CVI 6.0. However, I get the error:

can not find channel named "stdout"

when I type a puts command. Have you encountered this problem? Any assistance would be appreciated.

Regards,

jcouto
0 Kudos
Message 4 of 6
(5,058 Views)
Build>>Target Settings,

choose: Create Console Application option and recompile!
You can then hide the Console Latter!

Regards,
Nikolai
0 Kudos
Message 5 of 6
(5,058 Views)
Is there an up to date version of this using CVI 8 and TCL 8.4 ?  I can't seem to get it to compile.
0 Kudos
Message 6 of 6
(4,711 Views)