Segmentation fault in program

2001-02-08 Thread T.J. Brown

Hi,

I'm trying to write a program (in C) that calls a
function that is implemented in Haskell.  The inputs
to the function is: a pointer to a buffer of unsigned
longs, the length of the input buffer, and a pointer
to a buffer of unsigned chars.  The function is to
convert the buffer of unsigned longs into a [Word32],
then convert that list into [Word8] (there will be
some sort of processing on this list eventually) and
then copy it to the output buffer.  I'm using
HaskellDirect to assist with this interface between C
and Haskell.  The problem I'm seeing is that depending
on the size of the buffer, the program segmentation
faults.  I don't see any obvious reason that this is
happening so I'm wondering if something isn't going
wrong during the compilation.

System info:
linux 2.2.12-20
gcc version: egcs-2.91.66

Attached are the source files and the compile output.

Also, is there a better way of passing a buffer
between C and Haskell?  For instance, is there a way
to convert the buffer into a list automatically?

Thanks for your help,
T.J.

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/
 convert.tar.gz


Compilation issue

2001-01-25 Thread T.J. Brown

Hi,

I'm trying to install the GHC compiler on an Intel
system running Windows ME.  I have installed the
cygwin toolkit and it seems to be working properly.  I
have also installed version 4.08.1 of GHC.  The
problem is that when I try to compile a "Hello,
World!" program, I get the following error:
gcc: c:/haskell/ghc/ghc-4.08.1/lib/Main.dll_o: No such
file or directory
gcc: c:/haskell/ghc/ghc-4.08.1/lib/PrelMain.dll_o: No
such file or directory

The path appears to be correct and indeed those two
files do not exist (in fact they do not exist
anywhere).  The question is, why are they not there? 
Are they missing from the installation or is there a
step that I'm supposed to take to create them?  Any
assistance in resolving this matter is greatly
appreciated.

Thanks,
T.J.


__
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices. 
http://auctions.yahoo.com/

___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs