[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Segfault in Mk_Proper_List
From: |
Erick Alphonse |
Subject: |
Re: Segfault in Mk_Proper_List |
Date: |
Sun, 20 Oct 2002 13:34:29 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826 |
Hi Olivier
> I get a segmentation fault when I call Mk_Proper_List from C, and I
> can't find what's wrong with my program (I'm using gprolog 1.2.16).
> Here is the listing, reduced to the minimum:
>
> #include "gprolog.h"
>
> int main_wrapper( int argc, char *argv[] )
> {
> int i;
> PlTerm elements[8];
> PlTerm list;
> for( i = 0; i < 8; i++ )
> {
> elements[i] = Mk_Integer( i );
> }
> list = Mk_Proper_List( 8, elements );
> return 0;
> }
Mk_Proper_list creates the term representation in the prolog stack. You
need to Start_Prolog(argc, argv); somewhere before creating terms.
Cheers,
Erick.
- Segfault in Mk_Proper_List, Olivier Teulière, 2002/10/19
- Re: Segfault in Mk_Proper_List,
Erick Alphonse <=
- consult/1 overrides dynamic predicate declarations?, Erick Alphonse, 2002/10/20
- Re: consult/1 overrides dynamic predicate declarations?, Lindsey Spratt, 2002/10/20
- Re: consult/1 overrides dynamic predicate declarations?, Erick Alphonse, 2002/10/25
- Settings etc. (Re: consult/1 overrides dynamic predicate declarations?), Timo Karjalainen, 2002/10/26
- Re: Settings etc. (Re: consult/1 overrides dynamic predicate declarations?), Erick Alphonse, 2002/10/28
- disabling C flags machine : -mcpu=pentiumpro on i686, Erick Alphonse, 2002/10/28