f



question about compiling tcl/tk and c program

hello,everyone
  My ActiveTcl is installed in /home/myname/ActiveTcl. when I compile
our tcl and c programs. I write a makefile and I set the -I and -L
options as follows:
-I~/ActiveTcl/include -L~/ActiveTcl/lib -ltcl8.4 -ltk8.4
after excute make command, the compile message as follows:
/usr/bin/ld:cannot find -ltcl8.4
collect2: ld returned 1 exit status

I code another small program, and use the follow command:
gcc test.c -o test -I~ActiveTcl/include -I~/ActiveTcl/lib
   ~/ActiveTcl/lib/libtcl8.4.so
it can compile successfully, but if use the follw command:
gcc test.c -o test -I~ActiveTcl/include -I~/ActiveTcl/lib
   -ltcl8.4
it cannot find -ltcl8.4

what's wrong? 
I need your help.

thank you very much.
guo

0
9/12/2005 3:35:21 AM
comp.lang.tcl 23429 articles. 2 followers. Post Follow

2 Replies
619 Views

Similar Articles

[PageSpeed] 36

Hi Guo,


guo writes:
> gcc test.c -o test -I~ActiveTcl/include -I~/ActiveTcl/lib
>    ~/ActiveTcl/lib/libtcl8.4.so
> it can compile successfully, but if use the follw command:
> gcc test.c -o test -I~ActiveTcl/include -I~/ActiveTcl/lib
>    -ltcl8.4
> it cannot find -ltcl8.4

Short version: Use this instead:

  gcc -o test test.c \
    -I$HOME/ActiveTcl/include \
    -L$HOME/ActiveTcl/lib -ltcl8.4

Long version:

"~" is a feature of the shell, just like "*" and "?".  But "~" is only
evaluated at the *start* of strings.  So the shell will translate
~/something => $HOME/something => /home/guo/something (assuming that
your home directory is "/home/guo").  But the shell will not touch
-I~/ActiveTcl/... because here "~" is not the first character of the
string.

Another thing (probably just a typo): ~ActiveTcl is not the same as
~/ActiveTcl.  ~ActiveTcl refers to the home directory of the user
"ActiveTcl", which probably doesn't exist on your machine.


benny
0
9/12/2005 1:13:12 PM
thanks benny
the above question has been resolved. now I come across another
question:
$./test
../test: error while loading shared libraries: libtcl8.4.so: cannot open
shared object file: No such file or directory
I use "ldd" to check test, then output message is as follows:
 $ ldd test
        libtcl8.4.so => not found
        libtk8.4.so => not found
        libc.so.6 => /lib/tls/libc.so.6 (0x42000000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

it maybe because my shared libraries is not set correctly after my
ActiveTcl is installed.
how should I set the shared libraries.  and if i use the .a libraries,
then how should i do?

thanks

guo 

l

0
9/13/2005 1:36:21 AM
Reply:

Similar Artilces:

Opening a TCL program from within another TCL program in ANSYS Tcl-Tk
Hi everyone, I have been pulling my hair with this one for a couple of days and still have not found a fix. I'm working within ANSYS Tcl-Tk implementation. I created a Tcl-Tk script that generates a simple window with three buttons. Each button opens another window which is created in a separate Tcl file. The second window have a lot of text entries, variables, procedures, etc. I can open the second Tcl file by itself and everything works as supposed, but when I open it using the button in the first window, it opens but any procedure called by the widgets on the second window are not found... Here's the deal... Since I'm working within the ANSYS implementation of Tcl-Tk, I'm actually using an ANSYS command to open the second window. The command I use is: ### ans_sendcommand ~eui,'source O:/mad_projects_2/ANSYS/Macros/ IBR_CAS.tcl' ### It actually sends a command back to ANSYS telling it to execute a Tcl command... I know this is not pretty but its the only way i was able to make it at least show the window. ############################## #Main Tcl (excerpt): ############################## namespace eval Tools { proc IBRCambpell {} { #source O:/mad_projects_2/ANSYS/Macros/IBR_CAS.tcl ans_sendcommand ~eui,'source O:/mad_projects_2/ANSYS/Macros/ IBR_CAS.tcl' } proc viewManager {} { ans_sendcommand ~eui,'source O:/mad_projects_2/ANSYS/Macros/ ViewManager.tcl' } proc powerAnnotation {} { ans_sendcommand ~eui,'source ...

question about tcl/tk and c program
In my Tcl/Tk scripts, I want to program different branches according to the result of my C extension procedures. In the C procedure, we usually use such codes as follow: int CountStart(ClientData clientData, Tcl_Interp *interp,int argc, char *argv[]) { ............... ................ interp->result = "end vpstart."; //return TCL_OK; return TCL_ERROR; } In Tcl/Tk scripts, we can use "set ret [count_start $sym]" or "catch {count_start $sym} ret" to call the C procedure CountStart. The variable "ret" is assigned with the string which was saved in "interp->result". Now I want it can return 0 or 1 or 2 in the C procedure CountStart, and then it can identify the result when call the c procedure in Tcl/Tk scripts. I just want identify the number which is in the "return ...." sentence, not in the interp->="....". How can I do this? Best Regards Guo "sunnyboyGuo@gmail.com" <sunnyboyGuo@gmail.com> wrote: # In my Tcl/Tk scripts, I want to program different branches according to # the result of my C extension procedures. # In the C procedure, we usually use such codes as follow: # int CountStart(ClientData clientData, Tcl_Interp *interp,int argc, char # *argv[]) # { # .............. # ............... # interp->result = "end vpstart."; # //return TCL_OK; # return TCL_ERROR; # } # In Tcl/Tk scripts, we can use "set ret [count_start $sym]" or # "...

Problem in calling c programs and compiling them in tcl/tk
Hello, I have been assigned to open a directory with c programs in it using tcl/tk. Later I am supposed to c ompile all those c programs in that directory one after another using tclk/tk. I am able to open the directory and read all the c files. But when it comes to compiling them am not able to do it at all. I have tried using exec gcc filename.c and later exec ./a.out filename.c. For example , if i take helloworld.c program & write above 2 steps , its showing the o/p as "helloworld" . But it's also saying like child process exited abnormally. Please can one suggest a simple command to execute c programs . All the fork and thread concepts are quite new and confusing to me. Isn't there any simple command in tcl from which i can call a c program and compile it ? I have spent nearly 4 days about this problem.But no idea at all. Please if anyone can solve this , reply soon , if possible with an example . I am supposed to complete it with in 1 day more. Thanks in advance On 11 nov, 11:23, vasavi.n...@gmail.com wrote: > Hello, > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 I have been assigned to open a direct= ory with c > programs in it using tcl/tk. Later I am supposed to c ompile all those > c programs in that directory one after another using tclk/tk. > I am able to open the directory and read all the c files. But when it > comes to compiling them am not able to do it at all. I have tried > using exec gcc filename.c and l...

Newbie to Tcl/Tk: Question about Tcl and VxWorks....
Hello All, I have tried looking on the offical tcl/tk website and also at WindRiver's without success. Please forgive my ignorance on this, but is tcl/tk available for VxWorks or is there in progress a port going on. Many thanks in advance, Richard "Richard Latter" <richard_l@latter.demon.co.uk> writes: > I have tried looking on the offical tcl/tk website and also at WindRiver's > without success. Please forgive my ignorance on this, but is tcl/tk > available for VxWorks or is there in progress a port going on. I have ancient Tcl 7.3 here, but don't know of newer ports. Donald Arseneau asnd@triumf.ca ...

E.J. Friedman-Hill's Tcl/Tk Course
E.J. Friedman-Hill's Tcl/Tk Course Tcl/Tk Programming in Five Easy Lessons http://www.linbox.com/ucome.rvt/any/doc_distrib/tcltk-8.3.2/TclCourse/ I am unable to open the ppt files that seem very promising. Can anyone see what is the problem with them and can convert/fix so that I can open in the office 2007 or open office ? Thanks Bolega On 24/03/2011 2:51 AM, bolega wrote: > E.J. Friedman-Hill's Tcl/Tk Course > Tcl/Tk Programming in Five Easy Lessons > > http://www.linbox.com/ucome.rvt/any/doc_distrib/tcltk-8.3.2/TclCourse/ > > I am unable to o...

create a tcl/tk interface for a c program
Hi, I have an application in c (a client for a news server). The application is working and running, the problem is that it is in command line mode. I want to create a separate tcl/tk interface that will control my c program; something like executing it, and reading the c-program results from the prompt and dealing with it... I need the two programs to be separated, and I don't need it to be a standalone program, I just need to launch the client from the tcl/tk interface and retrieve all messages in textbox or tables, and all the communication between the user and the c program wou...

a question about combining c++ and tcl/tk please?
Hi all, I am writing some simple code to test c++ with tcl/tk. myData class is trivial too. Compiling and linking the files, I got shared lib hello.so; I could not create an class object in the following code. ********************************** / * trycc.cpp: */ #include <stdio.h> #include <stdlib.h> #include <tcl.h> #include <tk.h> #include "myData.h" myData data1; /// not working here, could not load the package if have this line /// if I remove this line, then it worked fine. extern "C" int hello(ClientData data, Tcl_Interp* pInterp, int arc, const char* argv[]){ const char* mystr = "hello class"; Tcl_SetVar(pInterp, "tclvar", mystr,0); return TCL_OK; } extern "C" int Hello_Init(Tcl_Interp *interp){ Tcl_CreateCommand(interp, "hello", hello, NULL, NULL); return Tcl_PkgProvide(interp, "Hello", "1.0"); } Thanks a lot, Beet beet wrote: > Hi all, > > I am writing some simple code to test c++ with tcl/tk. myData class is > trivial too. > Compiling and linking the files, I got shared lib hello.so; I could not > create an class object in the following code. > > ********************************** > / * trycc.cpp: */ > #include <stdio.h> > #include <stdlib.h> > #include <tcl.h> > #include <tk.h> > #include "myData.h"...

[TCL/TK interface] Passing variable to TCL/TK
Hi, I am trying to sent to a variable to tcl/tk and unify there it with a string. I wrote the prolog code: :- use_module(library(tcltk)). :- use_package(classic). go(A):- tk_new([name('Simple')], Tcl), tcl_eval(Tcl, 'source simple2.tcl', _), tcl_eval(Tcl, ['ask', br(write(A))], _), tk_main_loop(Tcl), tcl_delete(Tcl). and the tcl file simple2.tcl proc ask {var} { unify_term $var my_value } unfortunatelly when I query for go(S). the interpeter goes into a loop (!?). Where I am wrong. Are there any example code somewhere i...

TCL/TCL combined with Java/C/C++, Any Recommendations?
Hi, I have an application that I wrote in TCL/TK. It has to work with big files +5GB. The parsing performace is not where I would like and some of the data manipulations are taking considerable amount of time due to the data size. Therefore I am considering switching these parts of the code to Java, C or C++. While keepting the GUI and GUI supporting code in TCL/TK at this time. I am trying to figure out which language will be easier to merge with TCL in an application. For C I know that I can compile and generate a .so or .dll and create a TCL package and load it. I believe this is done with SWIG but I have not done it. In Java I saw some info on Jacl and TclBlend. The application will be "compiled" into a TCL "executable". I know I can compile my TCL code into Byte code to protect the IP. I am not sure about Java. Any recommendations or pointers will be greatly appreciated. Thanks in advance, Frank Frank <kranfg@gmail.com> writes: > Hi, > > I have an application that I wrote in TCL/TK. It has to work with big files +5GB. > > The parsing performace is not where I would like and some of the data manipulations are taking considerable amount of time due to the data size. > > Therefore I am considering switching these parts of the code to Java, C or C++. While keepting the GUI and GUI supporting code in TCL/TK at this time. > > I am trying to figure out which language will be easier to ...

How to compile tcl or encrypt tcl
I use TclPro1.5 to compile my tcl script with tixwish in the Solaris before. But I cannot use the same method in Linux. Why? Is there any utility for me to compile or encrypt the code by using tixwish? The following is the simple code if I use the tixwish: #!/home/albertl/local/bin/tixwish puts "haha" And after using procomp by the TclPro1.5 Error in startup script: The TclPro ByteCode Loader is not available or does not support the correct version while executing "error "The TclPro ByteCode Loader is not available or does not support the correct version"" invoked from within "if {[catch {package require tbcload 1.3} err] == 1} { error "The TclPro ByteCode Loader is not available or does not support the correct version" ...." (file "a.tbc" line 4) The problem seems that tbcload1.3 cannot be found? But tbcload is already there "/home/albertl/local/lib/tbcload1.3" Why? Can anyone tell me? stratus schrieb: > I use TclPro1.5 to compile my tcl script with tixwish in the Solaris before. > But I cannot use the same method in Linux. Why? > > Is there any utility for me to compile or encrypt the code by using tixwish? > Tixwish is just a wish shell with the Tix package baked in. If TclPro does not have a specific bigwish with Tix included your out of luck on that road (but could build your own if you liked). You might have success with freewrap or TDK, don't know for su...

Problem with compiling a C language tcl/tk package
I posted the info below several weeks a go, but got no response. The subject may have been the problem :( [It was 'tktray package - System Tray Icon Support for Tk on X11'] Anyway, I needed a way to implement a trayicon under Linux and found the 'tktray' package, which needed compiling. Unfortunately I got a serious error. I have contacted the developer, but have had no response. I've tried to compile it to create the dynamic link libraries (*.so), but I get the following error in running the make command: [rob@gandalf tktray1.1]$ make gcc -pipe -DPACKAGE_NAME=\"tktray\" -DPACKAGE_TARNAME=\"tktray\" -DPACKAGE_VERSION=\"1.1\" -DPACKAGE_STRING=\"tktray\ 1.1\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_STAT64=1 -DHAVE_TYPE_OFF64_T=1 -DUSE_TCL_STUBS=1 -DUSE_TK_STUBS=1 -I"/usr/include" -I"/usr/include/tk8.4.11/generic" -I"/usr/include/tk8.4.11/unix" -I/usr/X11R6/include -O2 -fomit-frame-pointer -Wall -Wno-implicit-int -fPIC -c `echo tktray.c` -o tktray.o In file included from /usr/include/tk8.4.11/generic/tkPort.h:34, ...

Using Tcl/Tk as a user interface in a C program
Hi, i thought this question would come up every day, but i read this NG for a while and haven't seen it since. What i'd like to do is use Tcl/Tk in a standalone (linked against Tcl and/or Tk libs) C program. I'd like to open Windows and call Tcl scripts from C that handle the windows. I wouldn't like to have external scripts called, but i'd like to embed it in the C program. Has anybody got a short example for that (Linux / Windows)? Thanks for any hints, Torsten. MkTclApp is your friend: http://www.hwaci.com/sw/mktclapp/index.html Pretty simple, really. On T...

YouTube Playlist: Tcl/Tk Object Oriented Programming Using Itcl (incr Tcl) Lessons
Hi. Like I promised you hours ago.. The playlist in English : https://www.youtube.com/playlist?list=PLsAEIIjTPIo_1qeuc-rYwk0nxWAM38Dl_ The same playlist in Arabic : https://www.youtube.com/playlist?list=PLsAEIIjTPIo_91kA-iUz_5XGNmHzivHBG Enjoy! On Saturday, January 17, 2015 at 4:04:21 PM UTC+2, Rani Ahmad wrote: > Hi. > > Like I promised you hours ago.. > > The playlist in English : > > https://www.youtube.com/playlist?list=PLsAEIIjTPIo_1qeuc-rYwk0nxWAM38Dl_ > > The same playlist in Arabic : > > https://www.youtube.com/playli...

win32, link a C program against a static TCL/TK library
Hi everybody, i already received some hints here on how to generate a static TCL/TK library, it all worked fine. Also, i can now link my C program against that static library. The C program uses TCL/TK as an internal script language and at the moment just executes an example script that shows some buttons. It all works fine when i link my C program against a (dynamic) DLL. When i link it (unchanged) against a static LIB, it starts up, executes an internal script that shows some buttons, everything is drawn fine, but the buttons can't be pressed. The task manager says the program executes fine and i can close it by hitting the windows "close" button. But pressing the buttons that were generated from the internal script does not work. I don't know what goes wrong here, i haven't got a clue and i also don't know how to debug this or how to get closer to the problem. I've put the whole example project to this URL: http://www.s.netic.de/tmohr/c3.zip The example project needs the compiled Tcl and Tk sources with the static libs at: c:\home\tcl\tcl c:\home\tcl\tk It would be so very great if somebody could take a look at it to see where the problem could be. Kind regards, Torsten. Torsten Mohr <tmohr@s.netic.de> wrote: >It would be so very great if somebody could take a look at it >to see where the problem could be. are you running the event loop? Tk_MainLoop(); or while (1) { Tcl_DoOneEvent(TCL_ALL_EVENTS); } Hi, ...

Design question, Tcl/Tk <=> C data ...
In managing database objects, I use C based list objects which are similar to the old style (int argc, char **argv) of Tcl arg passing, and in addition, a form of "tagged list" which corresponds pretty closely to Tcl associative arrays, where each of the array elements are lists of the above kind, referenced by a "string" tag rather than a numerical index. I need to be able to pass data back and forth between the C interface to the database manager, and Tcl/TK for CRUD operations, and while I'd like to minimize the copying of data insofar as possible, however, portability is an issue, and I'd prefer to use published API's rather than try to use Tcl's internal structs to avoid this (I'd like this code not to break post 8.5.0). A simple approach in the C -> Tcl direction would be to pass a string in the form of an array set {} command, but shimmering might be an issue in creating the Tcl object, and I'd still have to manually parse the array and re-create the tagged list on the C side for the return (Tcl ->C) trip. So I'm wondering ... should I simply bite the bullet and use the Tcl_NewByteArrayObj(3) and friends to pass the objects as an associative array of lists, or perhaps use the Tcl_NewDictObj(3) approach. Is there any efficiency to be gained by using dicts over associative arrays at this level (eg: conversion back and forth between C and Tcl)? Should I instead do something else entirely? Has an...

l'C program executing from a tcl script with pipe opened using open command in Tcl
Hi all, I wanted to communicate with a C program from a Tcl script.. The test code i have written is below Both the 'C' program and Tcl script are located in the same directory. The 'C' program is below. I have named it CTCL.C #include<stdio.h> #include<string.h> int main() { int i; char c[30]; printf("Reading..."); scanf("%s",c); printf("String read is :%s\n",c); fflush(stdout); return 0; } I have compiled the program with the command cc CTCL.C -o ctcl So the executable was generated with the name 'ctcl' The Tcl script I have written is. I have named it TCLPIPETEST.tcl #!/usr/add-on/exptools/bin/tclsh set fd [open "|./ctcl" r+] gets $fd tmp1 puts "tmp1 = $tmp1" set stat 0 set tmp2 "Default value... " if { ![catch { puts $fd "abcdef" } res]} { if { ![catch { flush $fd } res] } { if { ![catch { gets $fd tmp2} res ] } { set stat 1 } else { puts "Error 'gets' from pipe : $res" } } else { puts "Error 'flush' from pipe:$res " } } else { puts "Error 'puts' from pipe:$res " } if { $stat == 1 } { puts "Success......:$tmp2 :)" } else { puts "Failure......:$tmp2 :(" } I have given all permissions for both the files above. When i execute the Tcl script My aim is to open a pipe with the 'C' executable 'ctcl', initially read so...

Extending TCL in C with tcl.h - Disabliing [<tcl-cmd>] feature
Hi, TCL has a command execution syntax like this: [<tcl cmd>] Anything inside the 3rd bracket will be executed as a Tcl command by the Tcl interprater. Is there any way I can disable/delete this Tcl construct [ <tcl-cmd>]? In other words, my Tcl interprator should print "[32]" for tcl command puts "[32]" It should not try to treat [] as a special character. Is this any way possible while extending Tcl in C with tcl.h? Thank you, Arijit * arijit79@gmail.com | puts "[32]" | | It should not try to treat [] as a special character. Check out the TCL quoting rules. http://www.tcl.tk/man/tcl8.4/TclCmd/Tcl.htm http://www.tcl.tk/man/tcl8.4/TclCmd/Tcl.htm#M10 http://www.tcl.tk/man/tcl8.4/TclCmd/Tcl.htm#M15 Any of puts {[32]} puts "\[32\]" will do the trick. R' On May 8, 3:14 am, ariji...@gmail.com wrote: > Is there any way I can disable/delete this Tcl construct [ <tcl-cmd>]? By doing this, you would disable the primary functionality of Tcl. I'm certain you could go into the tcl source and stop it - but why not talk about what you are really trying to do. Perhaps someone can give you a better way of doing what you are wanting to do. ...

Connecting a C program with a tcl program with a socket
Dear readers, Several threads on this newsgroup mentioned communication between external programs and a tcl program, or controlling an external program with by a tcl program. In essence, the basic means to do this relatively gracefull is to open a socket (or pipe) connection between the two, and let them communicate over it using messages. Just for those who asked for it or with an interest, not in this case as well throughwrought result of many tests, but an example of how this principle can work in practice, at least it did for me, and did so long in the past, using no all to speci...

tcl as library of c/c++/java program
Hi, All tcl books I know talking how tcl can dynamically load c library. Is any source out there talking about WHO A C/C++/JAVA PROGRAM TO USE TCL AS LIBRARY? Thank, alex "tak" <tak416@yahoo.com> wrote > All tcl books I know talking how tcl can dynamically load c library. > Is any source out there talking about WHO A C/C++/JAVA > PROGRAM TO USE TCL AS LIBRARY? Start with http://phaseit.net/claird/comp.lang.tcl/HowToC.html but some people think that you can choose a better overall architecture. http://mini.net/tcl/9303 If you choose to use Tcl libraries "the o...

Can I compile a tcl/tk extended C file into an exe file on windows?
I'm new to tcl/tk. I have a simple tk/tcl extended C file like this, #include <stdio.h> #include <stdlib.h> #include <tcl.h> #include <tk.h> int Tcl_AppInit(Tcl_Interp* interp) { int status; status = Tcl_Init(interp); if (status != TCL_OK) { return TCL_ERROR; } /* Initialize Tk values. */ status = Tk_Init(interp); if (status != TCL_OK) { return TCL_ERROR; } return TCL_OK; } int main(int argc, char** argv) { Tk_Main(argc, argv, Tcl_AppInit); return 0; } Can I compile this file into an exe file on windows? How? Thank you ysrise@gmail.com (yan) writes: [snip[ >Can I compile this file into an exe file on windows? How? > >Thank you cl -nologo -W3 -O2 -MD -I/opt/tcl/include -o thing.exe thing.c \opt\tcl\lib\tcl84.lib \opt\tcl\lib\tk84.lib If you don't have a C compiler, Google can help you find some. Microsoft even let you have theirs for free too. See the wiki. -- Pat Thoyts http://www.zsplat.freeserve.co.uk/resume.html To reply, rot13 the return address or read the X-Address header. PGP fingerprint 2C 6E 98 07 2C 59 C8 97 10 CE 11 E6 04 E0 B9 DD ...

following tcl command execution from C/C++ code to tcl in gdb
Hi, We have a C/C++ huge application that makes heavy use of tcl C bindings. We frequently have very long stack traces from within gdb/dbx that look like this: #7 0x0d0aac7d in TclObjInterpProc (clientData=0x12857160, interp=0x10924df8, objc=6, objv=0x15138a40) at ../generic/tclProc.c:1146 #8 0x0d043dc6 in TclEvalObjvInternal (interp=0x10924df8, objc=6, objv=0x15138a40, command=0xe0c1382 "", length=0, flags=262144) at ../generic/tclBasic.c:3087 #9 0x0d044045 in Tcl_EvalObjv (interp=0x10924df8, objc=6, objv=0x15138a40, flags=262144) at ../generic/tclBasic.c:3203 This is just a very small part of what can be a very long stack trace. Now by poking around I can see that in gdb I can print *objv[0] to see the first word of a command but this is painful. What we really want is a way to see what Tcl commands are being executed either while the program is running or easily from the stack trace. Can you run gdb as well as a Tcl debugger at the same time? Seems unlikely. How are people systematically tracing the execution of Tcl commands that are called from C/++ bindings? Thanks. foobarbaz99@hotmail.com wrote: > How are people systematically tracing the execution of Tcl commands > that are called from C/++ bindings? Are you familiar with Tcl_CreateObjTrace() ? Does it accomplish what you need? -- | Don Porter Mathematical and Computational Sciences Division | | donald.porter@nist.gov Information Technology Laboratory | | http://mat...

Debugger for Tcl/Tk and [incr Tcl]
hi, where can i get Coverage for debugging tcl/tk, [incr Tcl] source? this tool is advised to use in 'Practical Programming in Tcl and Tk' or any other good debugger, which i could use? best, s. On Jan 23, 5:56=A0am, Sitaca <sit...@gmail.com> wrote: > hi, > > where can i get Coverage for debugging tcl/tk, [incr Tcl] source? > this tool is advised to use in 'Practical Programming in Tcl and Tk' > > or any other good debugger, which i could use? I see, at http://wiki.tcl.tk/8638 , a brief reference to the topic of coverage for tcl. I don't know whether or not any of the tools mentioned include coverage of itcl. On 23 jan, 12:52, "Larry W. Virden" <lvir...@gmail.com> wrote: > On Jan 23, 5:56=A0am, Sitaca <sit...@gmail.com> wrote: > > > hi, > > > where can i get Coverage for debugging tcl/tk, [incr Tcl] source? > > this tool is advised to use in 'Practical Programming in Tcl and Tk' > > > or any other good debugger, which i could use? > > I see, athttp://wiki.tcl.tk/8638, a brief reference to the topic of > coverage for tcl. I don't know whether or not any of the tools > mentioned include coverage of itcl. I have a more complete version of the coverage tool mentioned on that page. I just never got around to publishing it more widely. As for debuggers: the Wiki has a lot of pointers on that subject as well. Regards, Arjen Larry W. Virden wrote:...

Using the XCode tools on Mac OSX to compile tcl/tk 8.5.5 C application ...
I've compiled and linked 8.5.5 on Mac OS X 10.4.11 using the Xcode tools as provided by the OS, and that all went just fine and dandy. I can bring up the tclsh8.5, and puts $tcl_patchLevel tells me that I've arrived, likewise with wish8.5 reporting a tcl_patchLevel of 8.5.5 as well, and it works OK. My problem is linking a trivial C application which creates a single ttk::button which links and runs just fine on FreeBSD (various), and Linux (32 bit and 64 bit), as well as Windows. I cannot for the life of me find either the libtk8.5.dylib or libtk8.5.a file on that platform, and so I cannot figure out how to link my application. In looking through the config.log file, I see somewhere the TK_LIB is set to -lTk, rather than -ltk8.5. Using that, I actually link my application, and get a runnable executable, which immediately dies when it attempts to start Tk up, and I'm thinking that I might have linked with the wrong library (bad memory access) 8-{. In general, one might figure that the library would be located within the tree which is defined by --prefix on the configure script. I've let it default, and I've specified it as well, but thus far, the libtk8.5.so beastie has eluded me. You've probably figured by now I'm a relative newbie to Mac development, but once I get through this hurdle, I expect that the combination of C and tcl/tk will make it appear as though I know what I'm doing (heh heh). The stack dump from gdb is: tst:~/sw/Ne...

Tcl-C question
I am creating a TCL interface for a library of C functions. The TCL interface commands need to be executed in a particular sequence; the first call will return a C pointer from underlying C layer which the Tcl script needs to store at its end and pass it as a parameter to the subsequent calls. What is the best way to pass this pointer back and forth? Do I need to pass it to the Tcl side after converting it to a string using sprintf and then call atoi at the C end to convert it back? Or is there a better way? Thanks in advance. Sabya This sounds like a good way to let scripts crash your l...

Web resources about - question about compiling tcl/tk and c program - comp.lang.tcl

Cool tools for compiling to JavaScript
Every programmer has a favorite language or two. JavaScript lovers are the luckiest these days because their language is taking over the Internet ...

Feds put protest activity under microscope in compiling national 'risk forecast'
Use of social media, the spread of "citizen journalism," and the involvement of young people are among the key trends highlighted by a federal ...

10 Tips For Compiling A Deal Sheet
Compiling a deal sheet is a great way of taking stock of your experience and of seeing where your experience may be lacking.

Compiling 64-Bit Code
Describes the 64-bit features available in OS X.

Is there a benefit to compiling your code as you go?
Stack Exchange This Q&A is part of a weekly series of posts highlighting common questions encountered by technophiles and answered by users ...

6 cool tools for compiling to JavaScript
Every programmer has a favorite language or two. JavaScript lovers are the luckiest these days because their language is taking over the Internet ...

Compiling The Absurd Box Score For Space Jam ; Or, Shawn Bradley Sucked Against Cartoons, Too
This is Regressing, a numbers-minded column by our clever friends at the Harvard College Sports Analysis Collective. Over the next few days, ...

We're Compiling Every Police-Involved Shooting In America. Help Us.
The United States has no database of police shootings. There is no standardized process by which officers log when they've discharged their weapons ...

Flat UI Pro Tutorial: Setting and Compiling Using LESS
In this video tutorial, you use components from Flat UI Pro to create a complete simple mail app using LESS. He takes you through the steps to ...

Industrious 4chan user is compiling a list of every videogame ever made
... me to enter a few hundreds of games into my Backloggery account , and I haven't even finished it yet. Ambitious 4chan user Data_baser is compiling ...

Resources last updated: 3/13/2016 5:13:19 PM