Executing complied C code 
Author Message
 Executing complied C code

        Hi,

        How can I execute a compiled C code with tcl?

        e.g.

C code : sample.c
------------
        #include <stdio.h>
        main()
        {      
          printf("Tcl");
        }
-------------
I compiled : gcc sample.c

I want something like this : sample.tcl
-------
exec ./a.out
------

        Thanks for any Help...

                                        Murat Balkas



Fri, 11 Aug 2000 03:00:00 GMT  
 Executing complied C code

Quote:

> How can I execute a compiled C code with tcl?
> C code : sample.c
>         #include <stdio.h>
>         main()
>         {
>           printf("Tcl");
>         }
> TCL code :
> exec ./a.out

You need to set the "success" return code from your
C program.

        $ cat sample.c
        #include <stdio.h>
        int main()
        {      
                printf("Tcl");
                exit(0);
        }

        $ gcc sample.c

        $ tclsh
        % exec a.out
        Tcl
        %

John Ellson



Fri, 11 Aug 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. assume cs:code,ds:code

2. to CS: or not to CS: in F-PC assembler

3. Initializing DX to Code Segment(CS) Memory Address...?!?

4. Initializing DX to Code Segment(CS) Memory Address…?!?

5. still does not complies

6. BNF for VHDL complying LL1

7. Standard complying or broken compiler ??

8. Does TCL comply with IEEE 754 floating point?

9. byte complied uplevel with single argument

10. Can lisp file be complied into executable file?

11. execute inline machine code?

12. C4c - Can't get embedded code to execute

 

 
Powered by phpBB® Forum Software