Prolog: GNU: Command line compiling seems not possible out of the box
knud van eeden <[email protected]> Mon, 6 Mar 2023 01:33:07 +0000 (UTC)
| Newsgroups | gmane.comp.gnu.prolog.general |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_4761023_1501106354.1678066387497 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 Pro= log file to an executable .exe. e. I tried also with the MINGW versionsWindows intel 64 bits auto-install s= etup=C2=A0(compiled under x86_64 / Windows 10 with MinGW64 gcc under MSys2)= .but they gave tons of 'reference not found errors' , e.g. when including t= he gcc.exe path.=C2=A0 f. First tried with the latest 64 bits version from=C2=A0http://www.gprolog= .org/#downloadWindows intel 64 bits auto-install setup=C2=A0(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, be= cause 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 compil= e =C2=A0gplc.exe helloworld.pro g. Then I did fall back on the 32 bits version (after uninstalling the 64 b= its version)=C2=A0http://www.gprolog.org/#downloadWindows intel 32 bits aut= o-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 d= ifferent x86 .lib files into the bin directory of GNU Prolog 32 bits. Then finally when compiling =C2=A0gplc.exe helloworld.pro it created successfully a file=C2=A0 =C2=A0helloworld.exe which when run did show 'Hello world'. with friendly greetingsKnud van Eeden ------=_Part_4761023_1501106354.1678066387497 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <html><head></head><body><div class=3D"yahoo-style-wrap" style=3D"font-fami= ly:courier new, courier, monaco, monospace, sans-serif;font-size:16px;"><di= v dir=3D"ltr" data-setdir=3D"false">Hello,</div><div dir=3D"ltr" data-setdi= r=3D"false"><br></div><div dir=3D"ltr" data-setdir=3D"false">a. Operating s= ystem: Microsoft Windows 10 Professional:</div><div dir=3D"ltr" data-setdir= =3D"false"><br></div><div dir=3D"ltr" data-setdir=3D"false">b. Clean instal= lation.</div><div dir=3D"ltr" data-setdir=3D"false"><br></div><div dir=3D"l= tr" data-setdir=3D"false">c. Given and using only this example file, save a= s 'helloworld.pro'.</div><div dir=3D"ltr" data-setdir=3D"false"><br></div><= div dir=3D"ltr" data-setdir=3D"false">:- initialization(main).<br></div><di= v dir=3D"ltr" data-setdir=3D"false"><div><div>main :-<br></div><div>write( = 'Hello world' ), nl,</div><div>halt.</div></div><div dir=3D"ltr" data-setdi= r=3D"false"><br></div></div><div dir=3D"ltr" data-setdir=3D"false">d. It lo= oks like information is missing when trying to compile this GNU Prolog file= to an executable .exe.<br></div><div dir=3D"ltr" data-setdir=3D"false"><br= ></div><div dir=3D"ltr" data-setdir=3D"false">e. I tried also with the MING= W versions</div><div dir=3D"ltr" data-setdir=3D"false"><a href=3D"http://ww= w.gprolog.org/setup-gprolog-1.5.0-mingw-x64.exe" rel=3D"nofollow" target=3D= "_blank" style=3D"font-family: "Times New Roman"; font-size: medi= um;">Windows intel 64 bits auto-install setup</a><span style=3D"font-family= : "Times New Roman"; font-size: medium;"> (compiled under x8= 6_64 / Windows 10 with MinGW64 gcc under MSys2).</span></div><div dir=3D"lt= r" data-setdir=3D"false"><span style=3D"font-family: "Times New Roman&= quot;; font-size: medium;">but they gave tons of 'reference not found error= s' , e.g. when including the gcc.exe path. </span></div><div dir=3D"lt= r" data-setdir=3D"false"><br></div><div dir=3D"ltr" data-setdir=3D"false">f= . First tried with the latest 64 bits version from <span class=3D"ydp6= 02aff69pasted-link"><a href=3D"http://www.gprolog.org/#download" style=3D"c= olor: rgb(25, 106, 212); text-decoration-line: underline; font-family: &quo= t;courier new", courier, monaco, monospace, sans-serif; font-size: 16p= x;" rel=3D"nofollow" target=3D"_blank">http://www.gprolog.org/#download</a>= </span></div><div dir=3D"ltr" data-setdir=3D"false"><span class=3D"ydp68449= 2f8pasted-link"><a href=3D"http://www.gprolog.org/setup-gprolog-1.5.0-msvc-= x64.exe" style=3D"font-family: "Times New Roman"; font-size: medi= um;" rel=3D"nofollow" target=3D"_blank">Windows intel 64 bits auto-install = setup</a><span style=3D"color: rgb(0, 0, 0); font-family: "Times New R= oman"; font-size: medium;"> (compiled under x86_64 / Windows 10 w= ith MSVC++)</span></span><br></div><div dir=3D"ltr" data-setdir=3D"false"><= a href=3D"http://www.gprolog.org/setup-gprolog-1.5.0-msvc-x64.exe" rel=3D"n= ofollow" target=3D"_blank">http://www.gprolog.org/setup-gprolog-1.5.0-msvc-= x64.exe</a><br></div><div dir=3D"ltr" data-setdir=3D"false">But that seems = to combine Microsoft Visual Studio and MINGW compilation, because getting e= rrors about e.g. 'as.exe' which<br></div><div dir=3D"ltr" data-setdir=3D"fa= lse">is clearly MINGW related and has nothing to do with Microsoft Visual S= tudio.</div><div dir=3D"ltr" data-setdir=3D"false">I saw those errors refer= ring to gcc.exe (thus MINGW) when trying to compile</div><div dir=3D"ltr" d= ata-setdir=3D"false"><br></div><div dir=3D"ltr" data-setdir=3D"false"> = ;gplc.exe helloworld.pro<br></div><div dir=3D"ltr" data-setdir=3D"false"><b= r></div><div dir=3D"ltr" data-setdir=3D"false">g. Then I did fall back on t= he 32 bits version (after uninstalling the 64 bits version) <span clas= s=3D"ydp684c9a11pasted-link"><a href=3D"http://www.gprolog.org/#download" s= tyle=3D"color: rgb(25, 106, 212); text-decoration-line: underline; font-fam= ily: "courier new", courier, monaco, monospace, sans-serif; font-= size: 16px;" rel=3D"nofollow" target=3D"_blank">http://www.gprolog.org/#dow= nload</a></span></div><div dir=3D"ltr" data-setdir=3D"false"><span>Windows = intel 32 bits auto-install setup (compiled under ix86 / Windows 10 with MSV= C++).</span><br></div><div dir=3D"ltr" data-setdir=3D"false"><a href=3D"htt= p://www.gprolog.org/setup-gprolog-1.5.0-msvc-x86.exe" rel=3D"nofollow" targ= et=3D"_blank">http://www.gprolog.org/setup-gprolog-1.5.0-msvc-x86.exe</a><b= r></div><div dir=3D"ltr" data-setdir=3D"false"><br></div><div dir=3D"ltr" d= ata-setdir=3D"false">I got a load of '.lib' files not found (e.g. advapi32.= lib, ...) errors, it kept continuing missing different .lib files.</div><di= v dir=3D"ltr" data-setdir=3D"false">At the end I copied some 500 different = x86 .lib files into the bin directory of GNU Prolog 32 bits.</div><div dir= =3D"ltr" data-setdir=3D"false"><br></div><div dir=3D"ltr" data-setdir=3D"fa= lse"><span><span style=3D"color: rgb(0, 0, 0); font-family: "courier n= ew", courier, monaco, monospace, sans-serif; font-size: 16px;">Then fi= nally when compiling</span></span></div><div dir=3D"ltr" data-setdir=3D"fal= se"><span><span style=3D"color: rgb(0, 0, 0); font-family: "courier ne= w", courier, monaco, monospace, sans-serif; font-size: 16px;"><br></sp= an></span></div><div dir=3D"ltr" data-setdir=3D"false"><span><span style=3D= "color: rgb(0, 0, 0); font-family: "courier new", courier, monaco= , monospace, sans-serif; font-size: 16px;"> gplc.exe helloworld.pro</s= pan></span><br></div><div dir=3D"ltr" data-setdir=3D"false"><span><span sty= le=3D"color: rgb(0, 0, 0); font-family: "courier new", courier, m= onaco, monospace, sans-serif; font-size: 16px;"><br></span></span></div><di= v dir=3D"ltr" data-setdir=3D"false"><span><span style=3D"color: rgb(0, 0, 0= ); font-family: "courier new", courier, monaco, monospace, sans-s= erif; font-size: 16px;">it created successfully a file </span></span><= /div><div dir=3D"ltr" data-setdir=3D"false"><span><span style=3D"color: rgb= (0, 0, 0); font-family: "courier new", courier, monaco, monospace= , sans-serif; font-size: 16px;"><br></span></span></div><div dir=3D"ltr" da= ta-setdir=3D"false"><span><span style=3D"color: rgb(0, 0, 0); font-family: = "courier new", courier, monaco, monospace, sans-serif; font-size:= 16px;"> helloworld.exe</span></span></div><div dir=3D"ltr" data-setdi= r=3D"false"><span><span style=3D"color: rgb(0, 0, 0); font-family: "co= urier new", courier, monaco, monospace, sans-serif; font-size: 16px;">= <br></span></span></div><div dir=3D"ltr" data-setdir=3D"false"><span><span = style=3D"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=3D"ltr" data-setdir=3D"false"><s= pan><span style=3D"color: rgb(0, 0, 0); font-family: "courier new"= ;, courier, monaco, monospace, sans-serif; font-size: 16px;"><br></span></s= pan></div><div dir=3D"ltr" data-setdir=3D"false"><span><span style=3D"color= : rgb(0, 0, 0); font-family: "courier new", courier, monaco, mono= space, sans-serif; font-size: 16px;">with friendly greetings</span></span><= /div><div dir=3D"ltr" data-setdir=3D"false"><span><span style=3D"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= =3D"ltr" data-setdir=3D"false"><br></div><div dir=3D"ltr" data-setdir=3D"fa= lse"><br></div><div dir=3D"ltr" data-setdir=3D"false"><br></div><div dir=3D= "ltr" data-setdir=3D"false"><br></div></div></body></html> ------=_Part_4761023_1501106354.1678066387497--