problem with DLM using external DLL [message #91873] |
Tue, 08 September 2015 09:20  |
markb77
Messages: 217 Registered: July 2006
|
Senior Member |
|
|
hi,
I've created a DLM in which I make calls to other functions stored in other DLL files. Let's say that my dlm consists of the following files: MYDLM.DLM and MYDLM.DLL. Within MYDLM.DLL, there is a call to a function that resides within the SECOND.DLL library.
I try to load my dlm with the following command:
DLM_LOAD, 'C:\mypath\MYDLM.DLM'
This fails with the following error:
% DLM_LOAD: Error loading sharable executable.
Symbol: IDL_Load, File = C:\mypath\MYDLM.dll
The specified module could not be found.
% Execution halted at: $MAIN$
However, everything loads correctly and works fine IF I copy the file SECOND.DLL into the binary directory of IDL, meaning the same directory in which idl.exe resides.
Why can't IDL find the SECOND.DLL, which is referenced in MYDLM.DLL? In this case SECOND.DLL is in the same path as MYDLM.DLL, i.e. 'C:\mypath\'.
Adding C:\mypath\ to the IDL_DLM_PATH or to IDL_PATH does not help.
Does anyone have a suggestion? Copying the SECOND.DLL file to the IDL root directory does not seem like a good solution.
thanks
Mark
|
|
|
Re: problem with DLM using external DLL [message #91874 is a reply to message #91873] |
Tue, 08 September 2015 09:37   |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
On 9/8/15 10:20 AM, superchromix wrote:
>
> hi,
>
> I've created a DLM in which I make calls to other functions stored in
> other DLL files. Let's say that my dlm consists of the following
> files: MYDLM.DLM and MYDLM.DLL. Within MYDLM.DLL, there is a call
> to a function that resides within the SECOND.DLL library.
>
> I try to load my dlm with the following command:
>
> DLM_LOAD, 'C:\mypath\MYDLM.DLM'
>
> This fails with the following error:
>
> % DLM_LOAD: Error loading sharable executable. Symbol: IDL_Load, File
> = C:\mypath\MYDLM.dll The specified module could not be found. %
> Execution halted at: $MAIN$
>
> However, everything loads correctly and works fine IF I copy the file
> SECOND.DLL into the binary directory of IDL, meaning the same
> directory in which idl.exe resides.
>
> Why can't IDL find the SECOND.DLL, which is referenced in MYDLM.DLL?
> In this case SECOND.DLL is in the same path as MYDLM.DLL, i.e.
> 'C:\mypath\'.
>
> Adding C:\mypath\ to the IDL_DLM_PATH or to IDL_PATH does not help.
>
> Does anyone have a suggestion? Copying the SECOND.DLL file to the
> IDL root directory does not seem like a good solution.
I believe on Windows (I am not a Windows expert!) that the PATH
environment variable also is used as the equivalent to LD_LIBRARY_PATH.
So you should be able to add the directory of second.dll to your PATH
(via the Control Panel on Windows) and then it will be found.
I agree copying second.dll to the IDL directory is a bad idea, but check
out all the stuff that is probably in your C:\Windows\System32 directory
some day.
Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
|
|
|
Re: problem with DLM using external DLL [message #91892 is a reply to message #91873] |
Wed, 09 September 2015 04:14  |
Haje Korth
Messages: 651 Registered: May 1997
|
Senior Member |
|
|
I set my DLM Path in windows under Preferences->IDL->Paths under Select Path->DLM Path and it works for me.
On Tuesday, September 8, 2015 at 12:20:37 PM UTC-4, superchromix wrote:
> hi,
>
> I've created a DLM in which I make calls to other functions stored in other DLL files. Let's say that my dlm consists of the following files: MYDLM.DLM and MYDLM.DLL. Within MYDLM.DLL, there is a call to a function that resides within the SECOND.DLL library.
>
> I try to load my dlm with the following command:
>
> DLM_LOAD, 'C:\mypath\MYDLM.DLM'
>
> This fails with the following error:
>
> % DLM_LOAD: Error loading sharable executable.
> Symbol: IDL_Load, File = C:\mypath\MYDLM.dll
> The specified module could not be found.
> % Execution halted at: $MAIN$
>
> However, everything loads correctly and works fine IF I copy the file SECOND.DLL into the binary directory of IDL, meaning the same directory in which idl.exe resides.
>
> Why can't IDL find the SECOND.DLL, which is referenced in MYDLM.DLL? In this case SECOND.DLL is in the same path as MYDLM.DLL, i.e. 'C:\mypath\'.
>
> Adding C:\mypath\ to the IDL_DLM_PATH or to IDL_PATH does not help.
>
> Does anyone have a suggestion? Copying the SECOND.DLL file to the IDL root directory does not seem like a good solution.
>
> thanks
> Mark
|
|
|