Integrating gcj and C

Robin Garner robin.garner@iname.com
Sun Jun 29 08:33:00 GMT 2003


Does anyone know what needs to be done to embed C++ into C 
without having a C++ main module ? I've looked at a bunch 
of mailing list archives and FAQs, and no-one seems to want 
to say.
The reason that having a C++ main program is not practical 
right now is this: My project involves integrating the 
JMTk memory management toolkit, written in Java, into the 
runtime for ghc, the Glasgow Haskell Compiler. I'm at the 
stage where JMTk now happily compiles with gcj, and I'm 
building the layer that will interface with the existing 
runtime system, which is written in C.
GHC produces its executables using the gcc code generator, 
with the runtime system in a .a file. The main program is 
generated by the compiler (afaict), and the compile and 
link commands ditto. I can easily add libraries to the 
link command. I would like, if at all possible, to do the 
one-off C++ initialization code myself, because I really 
don't want to have to mess with the actual ghc compiler.
Does anyone on this list know what is required (or 
who/where to ask) ? Performance is important (vital), so 
using CNI over JNI is essential.
Thanks in advance,
Robin
-- 
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /