Re: SWI Prolog qsave_program/2 win/unix trouble



On 2005-06-27, Mauro Di Nuzzo <picorna@xxxxxxxxx> wrote:
> Hi everybody,
>
> i've got some troubles here. I am currently using SWI prolog on my WinXP
> based PC.
>
> The question is:
> does anybody know if can I "qsave" under Windows with the following (for
> example)
>
> ?- | consult('myfile.pl').
> ?- | qsave_program('myexefile', [stand_alone(true), emulator('pl'), ...]).
>
> where the 'pl' emulator is the unix version of swi prolog (which i
> downloaded and saved into my hard drive, also in the current working
> directory),
>
> and hope that the newly created 'myexefile' will work under unix based
> systems (provided the .so libraries needed are in its same directory) ???
>
> This, after I read on how to create stand-alone executables using swi-pl's
> qsave_program/2 predicate. It takes the emulator file (indeed, any file)
> that is machine-dependent and simply concatenate to it the saved state
> (which is independant).
>
> So I thought...

And what is wrong? The normal Unix emulator is a single file executable,
so this sequence should produce a nice stand alone program. Note that
if you use any of the packages involving foreign code you have to place
the required .so files in a directory that is searched by the `foreign'
alias (see file_search_path/2).

I have been using this trick the other way around (making windows
binaries on Unix systems) without any trouble.

The only trouble I can imagine is that plwin.exe loads some code dealing
with the menus that may cause trouble when run on the Unix emulator.
Possibly you should be using plcon.exe to create the state.

Cheers --- Jan
.



Relevant Pages

  • Re: Interview in Byte with Chris Sontag/SCO and FUD relating toBSDsettlement agreement
    ... In message, "Greg 'groggy' Lehey" ... I always spell his name wrong. ... Peter Salus book "A Quarter Century of UNIX" mentioned that he got ... in trouble and that AT&T stopped the distribution (to the extent ...
    (freebsd-hackers)
  • Re: I need a free email client that saves emails as text files
    ... I have done this easily in Unix but am ... >having trouble with Windows 2000. ... >Does anyone know of a free email client that saves each email as its own ...
    (microsoft.public.internet.mail)
  • I need a free email client that saves emails as text files
    ... I have done this easily in Unix but am ... having trouble with Windows 2000. ... Does anyone know of a free email client that saves each email as its own ...
    (microsoft.public.internet.mail)
  • Re: xp cd lost!
    ... Windows crashes regularly every few months & takes 2 to 3 weeks to repair. ... I worked for 10 years with Unix had never any trouble. ... When you know about Unix it is very simple to do anything you want. ... frustration and energy sufficient to make you ...
    (alt.os.windows-xp)