LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Integration TCL in LabWindows/CVI

Hi everyone!
 
I am just a begginer with LabWindows/CVI and would like to use TCL commands from my CVI project. To do so, I have already added the tcl.h and the corresponding lib, but got some errors:
 
 Test.c - 20 errors,2 warnings
  "tcl.h"(201,21)  Redefinition of macro 'DLLIMPORT'.
  "tcl.h"(202,21)  Redefinition of macro 'DLLEXPORT'.
  "tcl.h"(416,33)  syntax error; found 'identifier' expecting ';'.
  "tcl.h"(417,37)  Redeclaration of '__int64'.
  "tcl.h"(417,37)  syntax error; found 'identifier' expecting ';'.
  "tcl.h"(661,5)   syntax error; found 'identifier' expecting '}'.
  "tcl.h"(661,26)  Warning: Empty declaration.
  "tcl.h"(662,1)   Unrecognized declaration.
  "tcl.h"(714,63)  Missing parameter type.
  "tcl.h"(714,63)  syntax error; found '*' expecting ')'.
  "tcl.h"(796,5)   syntax error; found 'identifier' expecting '}'.
  "tcl.h"(802,1)   Unrecognized declaration.
  "tcl.h"(815,59)  syntax error; found '*' expecting ')'.
  "tcl.h"(815,60)  Extraneous formal parameter specification.
  "tcl.h"(816,59)  syntax error; found '*' expecting ')'.
  "tcl.h"(816,60)  Extraneous formal parameter specification.
  "tcl.h"(817,51)  syntax error; found '*' expecting ')'.
  "tcl.h"(817,52)  Extraneous formal parameter specification.
  "tcl.h"(874,5)   syntax error; found 'identifier' expecting '}'.
  "tcl.h"(874,26)  Warning: Empty declaration.
  "tcl.h"(879,1)   Unrecognized declaration.
  "tcl.h"(1165,9)  syntax error; found 'identifier' expecting '}'.
I am not sure about what is the problem, cause I have donde the same thing in a Dev-Cpp project and worked perfectly.
 
I would really appreciate any comment you can add.
 
Regards!
0 Kudos
Message 1 of 5
(4,360 Views)
Hey Xanax,

It looks like you're seeing errors that would seem to indicate that this header file might have been intended for a C++ compiler (as you said you were able to use).  You can, however, try to adapt the header file to more appropiately address the syntax supported by ANSI C.  To do this, I would refer to each of the errors.  Double-click on each one of them to take you to the location.  For the "Redefinition" errors, comment out the lines from the header file.  For the other errors, start from the top of the list (important to start at the top because some subsequent errors can result from previous errors).  For the "found 'identifier'" error messages, most likely there is a keyword that is not appropriate for C.  For instance, if the header file says the word "class", classes do not exist in C.  Try to go through the header file, error by error, trying to figure out where the header file might be misaligned with C syntax.  During this process, feel free to post with any specific segments that it's complaining about and perhaps we can offer some guidance.
Thanks,

Andy McRorie
NI R&D
0 Kudos
Message 2 of 5
(4,311 Views)
That was exactly what was happening. I followed your suggestion and the problem was solved.
 
Thanks for your help!!!
0 Kudos
Message 3 of 5
(4,307 Views)
Can you post a sample project ?  I am trying to do the same thing, and I am having some problems.  What TCL are you using, I am using TCL 8.4.

Thanks for you help...
0 Kudos
Message 4 of 5
(4,158 Views)

Hello,

 

I know this post is dating a lot, but I've been succesfull till know to get correct information from the web. I would like to send TCL commands to my system under labwindows. Any chance you had succeed in the past? can you share your experience?

 

Thanks in advance.

 

0 Kudos
Message 5 of 5
(3,056 Views)