Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9166873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:15:17+00:00 2026-06-17T15:15:17+00:00

I started sicstus from my Cygwin prompt on my Windows7 64bit installation, and created

  • 0

I started sicstus from my Cygwin prompt on my Windows7 64bit installation, and created a prolog program. Then I saved it using the following command that created the file “test.sav” in my current folder.

save_program(test).

When I try to run this file, I get a cryptic error message:

$ ./test.sav
! Existence error in argument 1 of restore/1
! file '%0.bat' does not exist
! goal:  restore('%0.bat')
SICStus 4.2.0 (x86-win32-nt-4): Mon Mar  7 20:21:12 WEST 2011
Licensed to SP4idi.ntnu.no
| ?- halt.
./test.sav: line 2: $'\032\r': command not found
./test.sav: line 8: x??xU?u/:?HBa?m[F?????ld?l???l?????./test.sav: line 9: syntax error near unexpected token `)'
./test.sav: line 9: `}?????????8?h????)}???C?qa?   ??.?????????/F??7W???yE?lL}>}L???????"???o%"?aac|S[G?????"W????'??K?1Q???????H??M?4??=???bE?
???t[<??????I??\)T?*????????N+?4??@h? ?'?{?1J?*????F?Q??q?<B?5@????l?(s?x?`r?????b?5??%:#I?Eb?@????1-???|a?????  ?D??G?)??O?

When I look at the head of the file, this is what I get:

$ head ./test.sav
sicstus-4.2.0 -r %0.bat -a %1 %2 %3 %4 %5 %6 %7 %8 %9

# META_INFO 1
# FILE: "c:/eclipse/workspace_prolog/busstuc/test.sav"
# FR: "timeout"
# META_INFO END
version=4 archmask=0x2c81a
x??xU?u/:?HBa?m[F?????ld?l???l?????head: write error: Permission denied
head: write error

I also tried loading the file in a different manner:

$ sicstus -l ./test.sav
% loading c:/eclipse/workspace_prolog/busstuc/test.sav...
% c:/eclipse/workspace_prolog/busstuc/test.sav loaded, 0 msec 104 bytes
! Consistency error: memory and saved_state are inconsistent
! type 32-bit,BDD,GAUGE,ALL_BUT_PROLOG, saved state, type 32-bit,BDD,GAUGE, emulator
! goal:  ensure_loaded(user:'./test.sav')
SICStus 4.2.0 (x86-win32-nt-4): Mon Mar  7 20:21:12 WEST 2011
Licensed to SP4idi.ntnu.no
| ?- halt.

Can someone please explain to me why this is not working?
Am I doing something wrong here?
Thanks!

EDIT: I changed the filename from test.sav to test.bat following Per’s suggestion. This happens:

C:\eclipse\workspace_prolog\BussTUC>sicstus-4.2.0 -r C:\eclipse\workspace_prolog\BussTUC\test.bat.bat -a
! Existence error in argument 1 of restore/1
! file 'C:\\eclipse\\workspace_prolog\\BussTUC\\test.bat.bat' does not exist
! goal:  restore('C:\\eclipse\\workspace_prolog\\BussTUC\\test.bat.bat')
SICStus 4.2.0 (x86-win32-nt-4): Mon Mar  7 20:21:12 WEST 2011
Licensed to SP4idi.ntnu.no
| ?- halt.

C:\eclipse\workspace_prolog\BussTUC># META_INFO 1
'#' is not recognized as an internal or external command,
operable program or batch file.

C:\eclipse\workspace_prolog\BussTUC>The system cannot write to the specified device.
The system cannot write to the specified device.
 | The system cannot write to the specified device.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T15:15:19+00:00Added an answer on June 17, 2026 at 3:15 pm

    This, undocumented and unsupported, feature apparently never did work on Windows.

    Instead you can use one of the pre-built runtime systems that loads a main.sav from the folder containing the executable. E.g. save your test.sav as main.sav instead and place it alongside sprti.exe in a folder that contains a proper folder structure for SICStus, as described in the manual, in the section Runtime Systems on Windows Target Machines.

    The most common solution is to use the spld.exe tool an build a self contained executable but that requires the corresponding C compiler from Microsoft.

    (I am one of the SICStus Prolog developers)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I started downloading the MVC Template, and created a new project using this template.
I started an activity with dialog theme from onReceive() method by using context variable.
Started using Visual Studio 2012 RC since yesterday, We have one WCF solution. Whenever
Started learning algorithms. I understand how to find theta-notation from a 'regular recurrence' like
I started getting the following error whenever i use SVN in my server: svn:
I started using mysqli_* functions instead of the old mysql_* functions in PHP, and
I started my project since xcode 4.4, and I have created several view controllers
I started with requirement of reading and writing files in from/in a directory on
We started writing our functional and unit test cases in python using nose framework.
Started learning octave recently. How do I generate a matrix from another matrix by

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.