Page 1 of 1
IUP DLL EPIC Fail on Windows with 13.2 32-bit
Posted: Wed Jun 05, 2013 10:08 pm
by arcfide
I'm confused about getting a DLL to load. I'm trying to use the IUP toolkit on Windows, which works fine on Linux. Here's the link:
http://sourceforge.net/projects/iup/fil ... s/Dynamic/These are simple zip files of DLLs. I grabbed the dll11 version and tried to make it work. However, just trying to access the 'IupOpen' function, which should have a signature 'I IupOpen P P' using ⎕NA and the iup.dll file doesn't seem to work for me. No matter where I put the file, and no matter whether I use a relative path or a complete path, it says that it cannot find the module. I'm not sure I understand what I am doing wrong here. Help would be appreciated.
Re: IUP DLL EPIC Fail on Windows with 13.2 32-bit
Posted: Thu Jun 06, 2013 8:04 am
by StefanoLanzavecchia
I've had a similar problem recently and in my case the problem was not the DLL but one of the DLL my DLL depended on. In particular, the DLL I was trying to use was compiled with Visual Studio and it needed the Microsoft C Runtime which wasn't installed on the target machine. If you are in a similar situation, this tool should help you find what you are missing:
http://www.dependencywalker.com/
Re: IUP DLL EPIC Fail on Windows with 13.2 32-bit
Posted: Thu Jun 06, 2013 8:49 am
by Jay|Dyalog
Aaron,
I managed to get it to work with the dll8 version.
When I first downloaded the files I got this problem:
Code: Select all
⎕NA'P C:/Users/jay/iup-3.8_Win32_dll11_lib/iup|IupVersion'
FILE ERROR 2 No such file or directory: Shared library could not be loaded ("Access is denied.")
... but we eventually worked out that using Cygwin to set the "executable" permission bit on all the downloaded DLLs made the problem go away:
Code: Select all
$ chmod +x ~/iup-3.8_Win32_dll8_lib/*.dll
Code: Select all
⎕NA'P C:/Users/jay/iup-3.8_Win32_dll8_lib/iup|IupVersion'
⎕NA'P dyalog32|STRLEN P'
⎕NA'P dyalog32|MEMCPY >T1[] P P'
GetString←{l←STRLEN ⍵ ⋄ ⊃⌽MEMCPY l ⍵ l}
GetString IupVersion
3.8
(There must be some way to do this without using Cygwin, but I don't know what it is.)
In this case, iup.dll seems to be picking up an MSVCR80.dll that I already have installed on my system.
When I tried the same thing with the dll11 version, I got this error, presumably because I
don't have MSVCR110.dll installed.
Code: Select all
⎕NA'P C:/Users/jay/iup-3.8_Win32_dll11_lib/iup|IupVersion'
FILE ERROR 2 No such file or directory: Shared library could not be loaded ("The specified module could not be found.")
Jay.
Re: IUP DLL EPIC Fail on Windows with 13.2 32-bit
Posted: Thu Jun 06, 2013 9:03 am
by Vince|Dyalog
Hi Arcfide,
If you already have Visual Studio or Visual C++ installed, download the appropriate IUP 32-bit zip file. For VS2010 it is 10, VS2012 it is 11.
You could also get the corresponding MSVCRnnn.dll from Microsoft by searching for Visual C++ redistributable.
Remember to Unblock each zip or exe file that you download from the internet before attempting to use it.
Regards,
Vince
Re: IUP DLL EPIC Fail on Windows with 13.2 32-bit
Posted: Thu Jun 06, 2013 9:08 am
by Jay|Dyalog
Jay|Dyalog wrote:(There must be some way to do this without using Cygwin, but I don't know what it is.)
From Windows Explorer, right-click on iup.dll -> Properties -> Security ->Edit... and check the box to allow Read & execute permissions for Everyone.
From the Windows command prompt: