FFI & C++

Seth Kurtzberg seth@cql.com
30 Oct 2002 08:00:25 -0700


What is the O/S and compiler?  That the C++ new operator is not found is
very strange.  Throw is another story, as throw doesn't appear in the
compiled code with some compilers.

On Wed, 2002-10-30 at 04:18, Simon Marlow wrote:
> > I am currently trying to create a Haskell interface to a C++ 
> > library and
> > cannot get it to work completely. The problem seems to be 
> > that the linker
> > must be able to find the code for basic C++ constructs like 
> > new and throw.
> > Apparently it is able to do so when compiling an executable, 
> > but when I
> > try to do the same with ghci it fails. Anybody have an idea why this
> > happens and what to do about it?
> 
> I don't know the gory details, but it might be that we would have to link GHCi with the C++ linker for this to work.  Would anyone with a clue about C++ linking like to comment?
> 
> > The feature to install local packages is currently a bit 
> > awkward. I would
> > like to be able to simply use a local package the same way I 
> > use a normal
> > package, and my first try was to set the package-conf file in my .ghci
> > file. But this doesn't work very well for two reasons: (1) it 
> > only works
> > for the interpreter, but not for the compiler (2) it isn't read until
> > *after* the command line is read, so any packages given there is not
> > recognized. Is it possible to have a common (.ghc) file that 
> > is used for
> > both the compiler and the interpreter, and that is read *before* the
> > command line is interpreted?
> 
> Hmm, I must admit I'm a bit averse to adding features like this unless they are really necessary.  One problem is that when someone submits a bug report, we'll have to start asking "do you have a .ghc file?  what does it contain?".  The current situation has the advantage of being simple.
> 
> Can't you just alias ghc to 'ghc -package-conf ...'?
> 
> Cheers,
> 	Simon
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users@haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
-- 
Seth Kurtzberg
M. I. S. Corp
480-661-1849
Pager 888-605-9296, or 6059296@skytel.com