From liraola@opera.dia.fi.upm.es  Wed Jun  2 14:29:57 1999
Received: from goofy.fi.upm.es (goofy.fi.upm.es [138.100.8.23])
	by swi.swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id OAA18077
	for <prolog@swi.psy.uva.nl>; Wed, 2 Jun 1999 14:29:55 +0200 (MET DST)
Received: from conversion.relay.fi.upm.es by relay.fi.upm.es
 (PMDF V5.2-32 #33254) id <01JBXF6PUI340008ZH@relay.fi.upm.es> for
 prolog@swi.psy.uva.nl; Wed, 2 Jun 1999 14:29:39 MET-DST
Received: from opera.dia.fi.upm.es (opera.dia.fi.upm.es [138.100.11.43])
 by relay.fi.upm.es (PMDF V5.2-32 #33254)
 with ESMTP id <01JBXF6PGY7W000B3Z@relay.fi.upm.es> for prolog@swi.psy.uva.nl;
 Wed, 02 Jun 1999 14:29:39 +0200 (MET-DST)
Received: from localhost by opera.dia.fi.upm.es (8.8.4/FI-4.1) Wed,
 2 Jun 1999 11:53:01 +0100 (WET DST)
Date: Wed, 02 Jun 1999 11:52:59 +0100 (WET DST)
From: Luis Iraola Moreno <liraola@opera.dia.fi.upm.es>
Subject: Re: Embedding troubles
In-reply-to: <99060212445500.15139@gollem>
X-Sender: liraola@opera
To: prolog@swi.psy.uva.nl
Message-id: <Pine.SOL.3.95.990602111119.1161A-100000@opera>
MIME-version: 1.0
Content-type: TEXT/PLAIN; charset=US-ASCII


Hi again,

Jan, thanks a lot for your quick answer.

I am afraid I am still in trouble, but I think the solution is closely
connected with the following point:

> How do you relate the state?  Basically, there are two options.  One is
> to append the state to the main .exe file and the other is to pass 
> -x <path-to-state> to PL_initialise().  Both are supposed to work.

Well, up to now, I related my saved state just naming it as my main
application. So, if my C++ app. is called "myapp.exe", I just name the
saved state "myapp.qlf".

Regarding the arguments of PL_initialise(), I just passed in the argv[0]
the address of the string "myapp.exe".

Given that this way of relating the saved state is not one of the two
options Jan mentioned, I have first tried to change to one of the standard
options, hoping this will solve my major problem or at lest I will learn
something new in the way. 

The -x way is the one I would prefer, but I have not succeeded in my first
attempts. So my question is: 

How should I pass the "-x path-to-state" to PL_initialise()? 

I have tried first to concatenate it in argv[0], something like:

argv[0]="myapp.exe -x mystate.qlf"

Then I have tried to put the -x option in a second argv[]:

argv[0]="myapp.exe";
argv[1]="-x mystate.qlf";

But in both cases libpl.dll (version 2.9.7) exits the app. with code 1.

Thanks in advance for your help,

Luis Iraola.

