Re: Windows 32 bits exe generation issue
Jan Wielemaker <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
On 11/15/2013 09:39 AM, [email protected] wrote: > Hi, > following previous mails on Windows issues, I updated swi-prolog to > latest daily build and used 32 bit version. > > My issue with 64bits version was related to mingw being 32 bits, there > is no 64 bits version (running on windows, only a version on linux to > generate windows 64). AFAIK, there are, but you've got to search a little. > I still face an issue however during 32 bit compilation for exe > generation. Generating ddl is ok. > > my command: > > swipl-ld -initfile onefile.pl -o myexe.exe -v onefile.c otherfile.pl > otherfile2.pl > > Compilation (swipl.exe) ends in a: > > Syntax error: Undefined character escape in quoted atom or string: '\$' > consult(['otherfile.pl', > 'otherfile2.pl']),qsave_program('pltmp-2388.exe',[goal='\ > ** here ** > $welcome',toplevel=prolog,init file='onefile.pl']) > > > the '\$welcome' to create the exe is not accepted. > > If I set -shared, dll is correctly generated . > > I do not know if this is a bug introduced in latest build or not as I > could not test this before. Stricter checking for \-escapes was added at some point. The shell-escape routine of swipl-ld changes $ into \$, which is not a good idea on Windows. I pushed a number of patches to fix this, changing $welcome to the more traditional version/0 and version/1 predicates that avoid the need for quoting altogether and fixing the quote routine. You can simply fix this by adding "-g true" to suppress the initialization goal. Cheers --- Jan