need help compile c prog w/ 
Author Message
 need help compile c prog w/


I 'm trying to compile a C program with tk ; I ftp'ed a sample program
tkHelloWorld.c from the alcatel site and after huntng down all the include
directories and lib directories, tried to compile:
but i keep getting the following linker errors:

collect2: ld returned 1 exit status
/bin/ld: Unsatisfied symbols:
   Tcl_LinkVar (code)
   Tcl_UnlinkVar (code)
   shl_findsym (code)
   shl_load (code)

Please help. I have no clue what to do. I'm using Tcl 7.6 and Tk4.2.
the actual program is below.

#include <stdio.h>
#include <tcl.h>
#include <tk.h>

int main(argc, argv)
int argc;
char **argv;
/*      Tk_Window mainWindow; */
        Tcl_Interp *interp;
/*      static char *display = NULL; */

        interp = Tcl_CreateInterp();

/*      mainWindow = Tk_Init(interp, display, argv[0], "Tk");
        if (mainWindow == NULL) {
                fprintf(stderr, "%s\n", interp->result);

        if (Tcl_Init(interp) == TCL_ERROR) {
                fprintf(stderr, "Tcl_Init failed: %s\n", interp->result);
        if (Tk_Init(interp) == TCL_ERROR) {
                fprintf(stderr, "Tk_Init failed: %s\n", interp->result);

        Tcl_Eval(interp, "button .b -text \"Hello World\" -command exit");
        Tcl_Eval(interp, "pack .b");



I've also tried uncommenting and commneting out those portions above to
see if it would make a difference. It didnt'. (The changes file in Tk4.2 says
that TkCreateMainWindow has been replaced by Tk_Init).

Thanks a lot,


Mon, 29 Nov 1999 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. need to compile a prog with clisp

2. need help for a _very_ short prog.

3. Desparately need help to solve a prog Question !!

4. HELP needed on simple concat prog

5. simple f77 prog - need help

6. ----> Emergency: Need Help with fortran prog

7. Need help with simple expect prog.

8. Need help porting MacLisp prog to CL

9. How To Compile Ada Prog Interfaced With Fortran

10. how to compile/link a fortran prog in linux?(null)

11. How To Compile Ada Prog Interfaced With Fortran

12. Problem with a compiled prog via tcl2c


Powered by phpBB® Forum Software