[gambit-list] C and C++ versions of Gambit on the same computer
Pierre-Alexandre Fournier
pierre-alexandre.fournier at polymtl.ca
Tue May 2 22:37:59 EDT 2006
Hi,
thank you for your answer. I include Scheme code as a dynamic library in
C and C++ programs, that's why I asked the question. With your answer
I'm not worried anymore about compatibility issues, so I'll stay with
the normal configuration.
Cheers,
Pierre-Alexandre
Marc Feeley wrote:
> On 2-May-06, at 6:57 PM, Pierre-Alexandre Fournier wrote:
>
>> Hello,
>>
>> I would like to compile two version of Gambit on my computer, one for
>> C "gsc", and another for C++ "c-plusplus-gsc". Is it possible to add
>> an option to "configure" to have a "c-plusplus-" prefix (or something
>> similar) in front of the programs?
>
>
> Why do you want this? I'm asking because the "c-plusplus-gsc" and
> "gsc" would have the same input/output behavior because the output (.c
> file) is code that conforms to C *and* C++. You would see a difference
> if you are loading dynamically compiled modules into "gsc" but I
> suspect that is not a common thing.
>
> Where there is an important difference it is in the runtime library
> that is constructed. Another important difference is if your are
> compiling with the "-dynamic" flag (but then the only difference is the
> C or C++ compiler that is called by the ~~/bin/gsc-cc-o script that is
> called by gsc).
>
> What I'm getting at is that to get what you want you should build the
> Gambit system twice, and install it in two different directories:
>
> ./configure --prefix=/u/me/gc
> make
> make install
> make mostlyclean
> ./configure --prefix=/u/me/gc++ --enable-cplusplus
> make
> make install
>
> and then add /u/me/gc/bin and /u/me/gc++/bin to you path, and rename
> the binaries in /u/me/gc++/bin as needed (gsc -> c-plusplus-gsc, ...).
>
> Marc
>
More information about the Gambit-list
mailing list