Artifacts Associated With Ticket 3010850fffffffffffffffffffffffffffffffff
Ticket change [05b1b25aad] (rid 89107) by prince-george on 2010-06-03 06:23:32:
- assignee initialized to: "hobbs"
- cmimetype initialized to: "text/plain"
- comment initialized to:
i hv attached a file with very few C code lines.i am able to compile but failed at linking the C code. on typing gcc tcl_c.c i am getting following erro in the terminal. /tmp/ccPfH310.o: In function `main': tcl_c.c:(.text+0x41): undefined reference to `Tcl_CreateInterp' collect2: ld returned 1 exit status OS platform:Linux 2.6.32-22-generic I have successfully compiled and installed the Tcl.
- foundin initialized to: "obsolete: 8.4.19"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "prince-george"
- subsystem initialized to: "20. [interp]"
- title initialized to: "unable to link tcl in gcc"
- type initialized to: "Bug"
Add attachment "tcl_c.c" [e5b6982b93] (rid 104175) by prince-george on 2010-06-03 13:23:33.
Ticket change [4446a94105] (rid 116688) by prince-george on 2010-06-03 13:23:33:
- icomment:
File Added - 376051: tcl_c.c
- login: "prince-george"
- mimetype: "text/plain"
- username: "prince-george"
- icomment:
Ticket change [31b2b28f87] (rid 93476) by prince-george on 2010-06-03 13:25:35:
- icomment:
i am using tcll8.4.18
- login: "prince-george"
- mimetype: "text/plain"
- username: "prince-george"
- icomment:
Ticket change [2843488106] (rid 88670) by flatworm on 2010-06-03 15:57:41:
- icomment:
Not a bug: you most probably failed to link your code with libtcl of appropriate version. Refer to http://wiki.tcl.tk/3474 , search for the word "embed" on wiki.tcl.tk and if this doesn't help ask for help on the comp.lang.tcl newsgroup (accessible via http://groups.google.com/group/comp.lang.tcl). The bug may (and should) be closed. P.S. Also please note that Tcl 8.4.18 is very outdated as 8.5 is now the stable release and 8.6 is knocking at the door.
- login: "flatworm"
- mimetype: "text/plain"
- username: "flatworm"
- icomment:
Ticket change [57e94d26c3] (rid 117710) by dkf on 2010-06-03 17:23:19:
- closedate changed to: "2010-06-03T10:23:19"
- closer changed to: "dkf"
- icomment:
allow_comments - 1 1) Your code should call Tcl_FindExecutable before Tcl_CreateInterp (so that the Tcl library can initialize itself); see the documentation for how to do that. 2) Your bug is that you should also link against the Tcl library; compilers aren't smart enough to work that out for themselves (should be? Maybe, but definitely aren't). This might be as simple as adding -ltcl to where you call the compiler, or might also require telling the compiler/linker where to look (with -L/path/to/libdir).
- login: "dkf"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- status changed to: "Closed"
- subsystem changed to: "69. Other"
- username: "dkf"