delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/09/15/00:01:01

From: "Edmund Horner" <ejrh AT paradise DOT net DOT nz>
Newsgroups: comp.os.msdos.djgpp
References: <200009141606 DOT LAA19381 AT darwin DOT sfbr DOT org>
Subject: Re: pass C source to program binary?
Lines: 29
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
Organization: Paradise Net
Message-ID: <968989624.364486@shelley.paradise.net.nz>
Cache-Post-Path: shelley.paradise.net.nz!unknown AT 203-96-148-120 DOT tnt0 DOT paradise DOT net DOT nz
X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/)
Date: Fri, 15 Sep 2000 15:49:21 +1200
NNTP-Posting-Host: 203.96.152.26
X-Complaints-To: newsadmin AT xtra DOT co DOT nz
X-Trace: news.xtra.co.nz 968989625 203.96.152.26 (Fri, 15 Sep 2000 15:47:05 NZST)
NNTP-Posting-Date: Fri, 15 Sep 2000 15:47:05 NZST
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Considering this _is_ the DJGPP newsgroup, a DJGPP-specific solution might
be appropriate.

Use DXEs:
1. Call to gcc.exe to compile the external C file.
2. Call dxegen.exe to make it into a DXE.
3. Load it with _dxe_load().
4. Run it.

I have done exactly this for my ESP (Edmund's Server Pages) engine, and I'm
satisfied.

Edmund Horner.

"Jeff Williams" <jeffw AT darwin DOT sfbr DOT org> wrote in message
news:200009141606 DOT LAA19381 AT darwin DOT sfbr DOT org...
> Is there a obvious technique for passing the source code for a small C
> function (e.g., `for (i=1;i<=N;i++) y[i]=foo(x[i]);'), which might be in
> a file or passed via command-line, to an already-compiled C program and
> have that program be able to interpret and use the function internally?
>
> I'm looking for a way to give a program some extra flexibility
> without requiring the user to write various custom C functions and
> then re-compile/re-link with the main program.
>
> TIA---jtw
>


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019