Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!uunet!ogicse!milton!wjs From: wjs@milton.u.washington.edu (William Jon Shipley) Newsgroups: comp.sys.next Subject: Re: NeXT programming question Message-ID: <13384@milton.u.washington.edu> Date: 22 Dec 90 09:40:18 GMT References: <4923@idunno.Princeton.EDU> Organization: University of Washington, Seattle Lines: 22 Paul Lansky writes: >I have an application which parses a text file, converts it >to C code and then compiles and executes it with a system >call within the application. The application then reads the >data created and draws the appropriate plots. It works >but I think it is a kludge. I don't see anyway around >calling the C compiler short of writing my own interpreter but I hate >to use system("cc etc"). I just feels wrong. Any cute ideas? At Stanford Linear Accelerator this summer we had a similar problem. I solved it much the way you did, except I dynamically linked the new c code into my running code, looked up the address of its entry point (now in my address space), and just simply called it. This was actually pretty speedy (5 seconds on an 030), and, of course, the code flew. You can find out about dynamic linking either by doing a "man rld" on 2.0, or writing me. (My dynamic linking package has some features NeXT's is missing, and vice versa.) -w