Looking for redistributable C or C++ compiler to make MS-Win DLL

null@diku.dk (Niels Ull Jacobsen)
Tue, 20 Dec 1994 00:20:26 GMT

          From comp.compilers

Related articles
Looking for redistributable C or C++ compiler to make MS-Win DLL null@diku.dk (1994-12-20)
Re: Looking for redistributable C or C++ compiler to make MS-Win DLL anton@mips.complang.tuwien.ac.at (1995-01-04)
| List of all articles for this month |

Newsgroups: comp.lang.c++,comp.lang.c,comp.compilers,comp.os.ms-windows.programmer.misc
From: null@diku.dk (Niels Ull Jacobsen)
Keywords: C, tools, question, comment
Organization: Department of Computer Science, U of Copenhagen
Date: Tue, 20 Dec 1994 00:20:26 GMT

We are looking for a compiler, which can generate DLL code for
MS Windows and which can use a numeric coprocessor.


Background:


We are developing a program for simulating sewage treatment plants.
It would be nice, if experienced users could input their own numerical
expressions for some of the processes. We would like to have a dialog
box in which the user could type in his expression.


As these expressions will probably be rather complicated and will
be evaluated MANY times during the simulation, it will be too
inefficient to interpret the expression each time, even if we
preprocess it to generate a syntax tree.


We have therefore thought of the following scheme:


The program checks the expression for syntax errors and then generates
a C (or C++) program (probably just inserting "#define USR_EXPR1
(...)" in a header file). It then calls the compiler to compile to a
DLL, checks for compiler errors, and calls this DLL during the
simulation. All of this should of course be (reasonably) transparent
to the user.


So we need a simple C or C++ compiler capable of generating DLL's,
which can run under windows and which we can redistribute with our
product (for a reasonable licensing fee). And which supports numeric
coprocessors (we require our users to have one). It would of course be
nice to get an optimizing compiler.


As far as I understand, the Gnu C++ compiler does not exist in a
windows version. Otherwise, it would be an excellent choice.


Alternatively, we could generate code "on the fly". We could parse the
expression, changing it to RPN, and then generate the machine code
(not assembler) for evaluating it, using the 80x87 stack. However, I'm
not very familiar with 80x86/80x87 machine code, and those who will be
maintaining the code are even less so. And this will probably mean
more man-hours than we can spare.


Does anybody have any ideas/suggestions?


BTW, what is the time overhead for calling a function in a DLL?
--
      Niels Ull Jacobsen, Dep. of CS, U of Copenhagen (null@diku.dk)
      Roenne Alle 3 st.th, 2860 Soeborg, Denmark, tel. +45 39 66 39 86
[Since the x87 is a stack machine, generating RPN code is quite easy. You
may have to do it yourself, since the only redistributable compiler I know
is the rather bulky DJGPP. -John]
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.