Load dll file in AMPL

146 views
Skip to first unread message

Alan Delgado de Oliveira

unread,
Jan 11, 2018, 10:14:49 AM1/11/18
to AMPL Modeling Language
Hi all,

I have a dll file with some functions. On a computer with Windows 8.1 64-bit version, I can  (with the AMPL 32-bit version) load the file, use the functions I it, and solve the nonlinear programming problem. However, on another computer running under Windows 10 64-bit version, I systematically get the following error message:

Error load 'MultCumnormal.dll;
Error executing "load" command:
Cannot load library C:\...

Any idea would be appreciated,
Alan Delgado

ptiwari

unread,
Jan 11, 2018, 11:51:51 PM1/11/18
to AMPL Modeling Language
The problem could be specific to your operating system or the version of AMPL you are using it. You could try with AMPL 64 bit version if that works.

Thanks
Paras

Alan Delgado de Oliveira

unread,
Jan 12, 2018, 6:38:38 AM1/12/18
to AMPL Modeling Language
Hi Paras,

thank you for your reply. I have tried the AMPL 64-bit version, but I had not success. 

ptiwari

unread,
Jan 12, 2018, 2:36:27 PM1/12/18
to AMPL Modeling Language
Can you load other dll? For example ampl has ampltabl.dll. Are you able to load those dll? If you can, you might have problem with your dll. You could use tools such as dependency walker to examine your dll and all the module that it tries to load.

Thanks,
Paras

Alan Delgado de Oliveira

unread,
Jan 12, 2018, 4:22:47 PM1/12/18
to AMPL Modeling Language

Thank you for the answer Paras. I could load ampltabl.dll on Windows 10. I do not believe that it is an issue in the dll because it is working correctly on the Windows 8.1 computer. 

ptiwari

unread,
Jan 13, 2018, 1:47:29 PM1/13/18
to AMPL Modeling Language
Sometime when we move from one version of Operating System to another, there might be changes in the permission or dependency. So, it would be good to check if your dll could be loaded from another application. I believe this is a utility tool http://www.dependencywalker.com/ where you could look into your dll, all the modules inside it and make sure you are not missing something because you have moved from one operating system to another. After you confirm that your dll could be loaded from another program, then only we could isolate the problem is from AMPL.

Thanks,
Paras

Alan Delgado de Oliveira

unread,
Jan 31, 2018, 8:04:30 AM1/31/18
to AMPL Modeling Language
Thank you for your reply Mr. Paras. I could fix the issue. The dll was compiled using the Debug version of VS2013. It created dependency on the Visual Studio specific libraries. Therefore, In order to fix that, I recompiled the dll file using the Release approach from VS2013. I found the solution using the dependency walker and following the link below:

Reply all
Reply to author
Forward
0 new messages