msys2 / MINGW-packages

Package scripts for MinGW-w64 targets to build under MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
2.29k stars 1.22k forks source link

WISH: Can you add IUP GUI library to msys/MINGW64 #16642

Open milen-prg opened 1 year ago

milen-prg commented 1 year ago

Please, if it is possible, add IUP (+IM, +CD) GUI library for C and for LUA languages as mingw-w64-x86_64 package.

Biswa96 commented 1 year ago

Could you provide the source repository link of that project?

milen-prg commented 1 year ago

Could you provide the source repository link of that project?

The documentation of IUP GUI library is here: https://www.tecgraf.puc-rio.br/iup/

but the files for Windows are here: https://sourceforge.net/projects/iup/files/3.30/

To work all features, the library almost uses: CD: https://sourceforge.net/projects/canvasdraw/files/5.14/ IM: https://sourceforge.net/projects/imtoolkit/files/3.15/

The library suggests also its version of lua54.exe for fast start, but I try to research to use its dlls with lua in msys2, with no succeed. May be they were modified the interpreter, I'm not sure, unfortunately I have almost no experience in C bindings, etc.

P. S. This is small code example (example.lua):

require("iuplua")

iup.Message("Hello World 1","Hello world from IUP.")

-- to be able to run this script inside another context
if (iup.MainLoopLevel()==0) then
  iup.MainLoop()
  iup.Close()
end

Which works with their lua54.exe example.lua

But inside msys2/mingw64 (installed lua packages) the result is:

$ lua example1.lua C:\msys64\mingw64\bin\lua.exe: example2_1.lua:1: module 'iuplua' not found: no field package.preload['iuplua'] no file 'C:\msys64\mingw64\bin..\share\lua\5.4\iuplua.lua' no file 'C:\msys64\mingw64\bin..\share\lua\5.4\iuplua\init.lua' no file 'C:\msys64\mingw64\bin..\lib\lua\5.4\iuplua.lua' no file 'C:\msys64\mingw64\bin..\lib\lua\5.4\iuplua\init.lua' no file 'C:\msys64\mingw64\bin..\share\lua\5.4\iuplua.lua' no file 'C:\msys64\mingw64\bin..\share\lua\5.4\iuplua\init.lua' no file '.\iuplua.lua' no file '.\iuplua\init.lua' no file 'C:\Program Files (x86)\Lua\5.1\lua\iuplua.luac' no file 'C:\msys64\mingw64\bin..\lib\lua\5.4\iuplua.dll' no file 'C:\msys64\mingw64\bin..\lib\lua\5.4..\lib\lua\5.4\iuplua.dll' no file 'C:\msys64\mingw64\bin..\lib\lua\5.4\loadall.dll' no file '.\iuplua.dll' stack traceback: [C]: in function 'require' example2_1.lua:1: in main chunk [C]: in ?

If I change the first row require("iuplua") to require("iuplua54"), the result is:

C:\msys64\mingw64\bin\lua.exe: error loading module 'iuplua54' from file '.\iuplua54.dll': The specified procedure could not be found.

stack traceback: [C]: in ? [C]: in function 'require' example2_1m.lua:1: in main chunk [C]: in ?

The example.lua is in the current folder with all IUP, CD and IM dlls.

This was my research, but I have no system programming knowledge.