Re: Prolog: GNU: Command line compiling seems not possible out of the box
Daniel Diaz <[email protected]> Mon, 27 Mar 2023 14:28:52 +0200
| Newsgroups | gmane.comp.gnu.prolog.general |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------ZMOmsk6QzRGzDF9cokSKTb6J
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Hi,
Command-line compilation under windows requires additional tools. You'll
find more information int the file src/WINDOWS in the source
distribution (also here:
https://github.com/didoudiaz/gprolog/blob/master/src/WINDOWS). It
provides information about compiling gprolog itself on Windows (maybe
some steps can be avoided to only compile a end-user Prolog source).
Daniel
Le 06/03/2023 à 02:33, knud van eeden a écrit :
> Hello,
>
> a. Operating system: Microsoft Windows 10 Professional:
>
> b. Clean installation.
>
> c. Given and using only this example file, save as 'helloworld.pro'.
>
> :- initialization(main).
> main :-
> write( 'Hello world' ), nl,
> halt.
>
> d. It looks like information is missing when trying to compile this
> GNU Prolog file to an executable .exe.
>
> e. I tried also with the MINGW versions
> Windows intel 64 bits auto-install setup
> <http://www.gprolog.org/setup-gprolog-1.5.0-mingw-x64.exe> (compiled
> under x86_64 / Windows 10 with MinGW64 gcc under MSys2).
> but they gave tons of 'reference not found errors' , e.g. when
> including the gcc.exe path.
>
> f. First tried with the latest 64 bits version from
> http://www.gprolog.org/#download
> Windows intel 64 bits auto-install setup
> <http://www.gprolog.org/setup-gprolog-1.5.0-msvc-x64.exe> (compiled
> under x86_64 / Windows 10 with MSVC++)
> http://www.gprolog.org/setup-gprolog-1.5.0-msvc-x64.exe
> But that seems to combine Microsoft Visual Studio and MINGW
> compilation, because getting errors about e.g. 'as.exe' which
> is clearly MINGW related and has nothing to do with Microsoft Visual
> Studio.
> I saw those errors referring to gcc.exe (thus MINGW) when trying to
> compile
>
> gplc.exe helloworld.pro
>
> g. Then I did fall back on the 32 bits version (after uninstalling the
> 64 bits version) http://www.gprolog.org/#download
> Windows intel 32 bits auto-install setup (compiled under ix86 /
> Windows 10 with MSVC++).
> http://www.gprolog.org/setup-gprolog-1.5.0-msvc-x86.exe
>
> I got a load of '.lib' files not found (e.g. advapi32.lib, ...)
> errors, it kept continuing missing different .lib files.
> At the end I copied some 500 different x86 .lib files into the bin
> directory of GNU Prolog 32 bits.
>
> Then finally when compiling
>
> gplc.exe helloworld.pro
>
> it created successfully a file
>
> helloworld.exe
>
> which when run did show 'Hello world'.
>
> with friendly greetings
> Knud van Eeden
>
>
>
>
--------------ZMOmsk6QzRGzDF9cokSKTb6J
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi,</p>
<p>Command-line compilation under windows requires additional tools.
You'll find more information int the file src/WINDOWS in the
source distribution (also here:
<a class="moz-txt-link-freetext" href="https://github.com/didoudiaz/gprolog/blob/master/src/WINDOWS">https://github.com/didoudiaz/gprolog/blob/master/src/WINDOWS</a>). It
provides information about compiling gprolog itself on Windows
(maybe some steps can be avoided to only compile a end-user Prolog
source).<br>
</p>
<p>Daniel</p>
<p><br>
</p>
<div class="moz-cite-prefix">Le 06/03/2023 à 02:33, knud van eeden a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:[email protected]">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div class="yahoo-style-wrap" style="font-family:courier new,
courier, monaco, monospace, sans-serif;font-size:16px;">
<div dir="ltr" data-setdir="false">Hello,</div>
<div dir="ltr" data-setdir="false"><br>
</div>
<div dir="ltr" data-setdir="false">a. Operating system:
Microsoft Windows 10 Professional:</div>
<div dir="ltr" data-setdir="false"><br>
</div>
<div dir="ltr" data-setdir="false">b. Clean installation.</div>
<div dir="ltr" data-setdir="false"><br>
</div>
<div dir="ltr" data-setdir="false">c. Given and using only this
example file, save as 'helloworld.pro'.</div>
<div dir="ltr" data-setdir="false"><br>
</div>
<div dir="ltr" data-setdir="false">:- initialization(main).<br>
</div>
<div dir="ltr" data-setdir="false">
<div>
<div>main :-<br>
</div>
<div>write( 'Hello world' ), nl,</div>
<div>halt.</div>
</div>
<div dir="ltr" data-setdir="false"><br>
</div>
</div>
<div dir="ltr" data-setdir="false">d. It looks like information
is missing when trying to compile this GNU Prolog file to an
executable .exe.<br>
</div>
<div dir="ltr" data-setdir="false"><br>
</div>
<div dir="ltr" data-setdir="false">e. I tried also with the
MINGW versions</div>
<div dir="ltr" data-setdir="false"><a
href="http://www.gprolog.org/setup-gprolog-1.5.0-mingw-x64.exe"
rel="nofollow" target="_blank" style="font-family:
"Times New Roman"; font-size: medium;"
moz-do-not-send="true">Windows intel 64 bits auto-install
setup</a><span style="font-family: "Times New
Roman"; font-size: medium;"> (compiled under x86_64 /
Windows 10 with MinGW64 gcc under MSys2).</span></div>
<div dir="ltr" data-setdir="false"><span style="font-family:
"Times New Roman"; font-size: medium;">but they
gave tons of 'reference not found errors' , e.g. when
including the gcc.exe path. </span></div>
<div dir="ltr" data-setdir="false"><br>
</div>
<div dir="ltr" data-setdir="false">f. First tried with the
latest 64 bits version from <span
class="ydp602aff69pasted-link"><a
href="http://www.gprolog.org/#download" style="color:
rgb(25, 106, 212); text-decoration-line: underline;
font-family: "courier new", courier, monaco,
monospace, sans-serif; font-size: 16px;" rel="nofollow"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">http://www.gprolog.org/#download</a></span></div>
<div dir="ltr" data-setdir="false"><span
class="ydp684492f8pasted-link"><a
href="http://www.gprolog.org/setup-gprolog-1.5.0-msvc-x64.exe"
style="font-family: "Times New Roman";
font-size: medium;" rel="nofollow" target="_blank"
moz-do-not-send="true">Windows intel 64 bits auto-install
setup</a><span style="color: rgb(0, 0, 0); font-family:
"Times New Roman"; font-size: medium;"> (compiled
under x86_64 / Windows 10 with MSVC++)</span></span><br>
</div>
<div dir="ltr" data-setdir="false"><a
href="http://www.gprolog.org/setup-gprolog-1.5.0-msvc-x64.exe"
rel="nofollow" target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">http://www.gprolog.org/setup-gprolog-1.5.0-msvc-x64.exe</a><br>
</div>
<div dir="ltr" data-setdir="false">But that seems to combine
Microsoft Visual Studio and MINGW compilation, because getting
errors about e.g. 'as.exe' which<br>
</div>
<div dir="ltr" data-setdir="false">is clearly MINGW related and
has nothing to do with Microsoft Visual Studio.</div>
<div dir="ltr" data-setdir="false">I saw those errors referring
to gcc.exe (thus MINGW) when trying to compile</div>
<div dir="ltr" data-setdir="false"><br>
</div>
<div dir="ltr" data-setdir="false"> gplc.exe helloworld.pro<br>
</div>
<div dir="ltr" data-setdir="false"><br>
</div>
<div dir="ltr" data-setdir="false">g. Then I did fall back on
the 32 bits version (after uninstalling the 64 bits version) <span
class="ydp684c9a11pasted-link"><a
href="http://www.gprolog.org/#download" style="color:
rgb(25, 106, 212); text-decoration-line: underline;
font-family: "courier new", courier, monaco,
monospace, sans-serif; font-size: 16px;" rel="nofollow"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">http://www.gprolog.org/#download</a></span></div>
<div dir="ltr" data-setdir="false"><span>Windows intel 32 bits
auto-install setup (compiled under ix86 / Windows 10 with
MSVC++).</span><br>
</div>
<div dir="ltr" data-setdir="false"><a
href="http://www.gprolog.org/setup-gprolog-1.5.0-msvc-x86.exe"
rel="nofollow" target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">http://www.gprolog.org/setup-gprolog-1.5.0-msvc-x86.exe</a><br>
</div>
<div dir="ltr" data-setdir="false"><br>
</div>
<div dir="ltr" data-setdir="false">I got a load of '.lib' files
not found (e.g. advapi32.lib, ...) errors, it kept continuing
missing different .lib files.</div>
<div dir="ltr" data-setdir="false">At the end I copied some 500
different x86 .lib files into the bin directory of GNU Prolog
32 bits.</div>
<div dir="ltr" data-setdir="false"><br>
</div>
<div dir="ltr" data-setdir="false"><span><span style="color:
rgb(0, 0, 0); font-family: "courier new",
courier, monaco, monospace, sans-serif; font-size: 16px;">Then
finally when compiling</span></span></div>
<div dir="ltr" data-setdir="false"><span><span style="color:
rgb(0, 0, 0); font-family: "courier new",
courier, monaco, monospace, sans-serif; font-size: 16px;"><br>
</span></span></div>
<div dir="ltr" data-setdir="false"><span><span style="color:
rgb(0, 0, 0); font-family: "courier new",
courier, monaco, monospace, sans-serif; font-size: 16px;"> gplc.exe
helloworld.pro</span></span><br>
</div>
<div dir="ltr" data-setdir="false"><span><span style="color:
rgb(0, 0, 0); font-family: "courier new",
courier, monaco, monospace, sans-serif; font-size: 16px;"><br>
</span></span></div>
<div dir="ltr" data-setdir="false"><span><span style="color:
rgb(0, 0, 0); font-family: "courier new",
courier, monaco, monospace, sans-serif; font-size: 16px;">it
created successfully a file </span></span></div>
<div dir="ltr" data-setdir="false"><span><span style="color:
rgb(0, 0, 0); font-family: "courier new",
courier, monaco, monospace, sans-serif; font-size: 16px;"><br>
</span></span></div>
<div dir="ltr" data-setdir="false"><span><span style="color:
rgb(0, 0, 0); font-family: "courier new",
courier, monaco, monospace, sans-serif; font-size: 16px;"> helloworld.exe</span></span></div>
<div dir="ltr" data-setdir="false"><span><span style="color:
rgb(0, 0, 0); font-family: "courier new",
courier, monaco, monospace, sans-serif; font-size: 16px;"><br>
</span></span></div>
<div dir="ltr" data-setdir="false"><span><span style="color:
rgb(0, 0, 0); font-family: "courier new",
courier, monaco, monospace, sans-serif; font-size: 16px;">which
when run did show 'Hello world'.</span></span></div>
<div dir="ltr" data-setdir="false"><span><span style="color:
rgb(0, 0, 0); font-family: "courier new",
courier, monaco, monospace, sans-serif; font-size: 16px;"><br>
</span></span></div>
<div dir="ltr" data-setdir="false"><span><span style="color:
rgb(0, 0, 0); font-family: "courier new",
courier, monaco, monospace, sans-serif; font-size: 16px;">with
friendly greetings</span></span></div>
<div dir="ltr" data-setdir="false"><span><span style="color:
rgb(0, 0, 0); font-family: "courier new",
courier, monaco, monospace, sans-serif; font-size: 16px;">Knud
van Eeden</span></span></div>
<div dir="ltr" data-setdir="false"><br>
</div>
<div dir="ltr" data-setdir="false"><br>
</div>
<div dir="ltr" data-setdir="false"><br>
</div>
<div dir="ltr" data-setdir="false"><br>
</div>
</div>
</blockquote>
</body>
</html>
--------------ZMOmsk6QzRGzDF9cokSKTb6J--