You did the right thing but I have made a mistake. I have put the Poly/ML bin directory into the PATH variable but with a wrong path syntax. Correcting it made it work, as Windows looks for DLLs in the directories listed in PATH. So now ./a.exe works on a fresh shell with PATH set correctly.
I have another question, possibly related to libraries as well. When trying to start the poly executable on msys2-mingw64, I get
$ poly Poly/ML 5.9.1 Release
but no prompt I get, it freezes and I cannot get out of it by ctrl-c or ctrl-d.
Is this a library problem or some lack of functionality in Windows prevents this from working?
- Gergely
On Thu, 22 May 2025 at 13:39, David Matthews David.Matthews@prolingua.co.uk wrote:
Hi, DLL paths in Windows are a bit different to shared libraries in Unix-like systems. There are various ways of configuring DLL paths on Windows but the easiest is just to copy the DLL so that it is in the same directory as the executable.
The installation process that configure creates puts the DLL into the bin subdirectory. So if you want to run a.exe in your home directory make a copy of /c/polyml/bin/libpolyml-14.dll and put it in your home directory.
David
On 22/05/2025 11:56, Gergely Buday wrote:
Hi there,
I compiled Poly/ML on Windows with msys2 and I use it on msysw-mingw64.
I compiled a Hello World program but when I try to run it I get into trouble:
$ ./a.exe C:/msys64/home/gbuday/a.exe: error while loading shared libraries: libpolyml-14.dll: cannot open shared object file: No such file or directory
When I check the lib library I see
$ ls -l /c/polyml/lib total 2140 -rw-r--r-- 1 gbuday None 1152 May 22 11:17 libpolymain.a -rw-r--r-- 1 gbuday None 932 May 22 11:17 libpolymain.la -rw-r--r-- 1 gbuday None 1151480 May 22 11:17 libpolyml.a -rw-r--r-- 1 gbuday None 1020630 May 22 11:17 libpolyml.dll.a -rw-r--r-- 1 gbuday None 956 May 22 11:17 libpolyml.la drwxr-xr-x 1 gbuday None 0 May 22 11:17 pkgconfig drwxr-xr-x 1 gbuday None 0 May 22 11:17 polyml
I used
./configure --disable-windows --enable-windows-64bit --prefix=/c/polyml
Was this a mistake?
- Gergely
Poly/ML mailing list -- polyml@lists.polyml.org To unsubscribe send an email to polyml-leave@lists.polyml.org