Re: Phix DLL dependency issue
- Posted by petelomax Jul 03, 2018
- 1425 views
By replacing all the iup dlls in PGui\win32 with the ones from my installation, everything works again.
What I would like is for Phix to use my existing IUP installation and deal with binding errors myself.
I will have a look at doing this (in a sanitary way if such a thing is possible).
Hmm, I seem to have faffed about a bit there. In pGUI.e/iup_open_dll I see:
if chdir(dll_path)=0 then ?9/0 end if path = current_dir()&SLASH&path
and I suspect that second line is at least a bit bogus, and should perhaps just be removed.
And in iup_init1(),
if s!={} then if platform()=WINDOWS then -- DEV (while manually installed on lnx) printf(1,"unable to locate %s directory\n",dll_dir) {} = wait_key() ?9/0 end if end if
is probably a bit over-zealous/pre-emptive. Perhaps where that code currently is might be better as
dll_path = ""
and avoid any subsequent attempts to chdir(""), eg/ie replace that line above with
if dll_path!="" and chdir(dll_path)=0 then ?9/0 end if
and only issue an error if/after we couldn't open the dll.
Oh, I nearly forgot, I was going to say, "what happens if you just delete/rename the demo\pGUI\win32 directory?", however a
quick look at the code suggested that would not end well - when of course it should [as in when this is properly fixed] be fine.
Pete