Problem with Extended Function Library, "Cannot find library amplgsl.dll"

193 views
Skip to first unread message

Suryam Gupta

unread,
Jun 2, 2022, 10:42:05 AM6/2/22
to AMPL Modeling Language
I am trying to work out the extended function library by following this article - https://ampl.com/resources/extended-function-library/

Now when I try running the command "load amplgsl.dll;" either in console or by putting it in .run file and then sending it to ampl, in both cases it shows "Cannot find library amplgsl.dll". 
I also tried using amplgsl_64.dll (I am using a 64 bit system) and ampl_32.dll as well, but it still gives the same error, i.e. Cannot find library amplgsl_64.dll. 

In the amplgsl.mswin64 folder (the one I downloaded from the link given above), I have 3 files, one of them being "ampl.gsl". This file has the command "load amplgsl.dll", along with all the functions name defined. I tried changing the command to "load amplgsl_64.dll" and saving it here and then running it, but still the same error.

It would be really helpful if someone could help in solving this error.

AMPL Google Group

unread,
Jun 3, 2022, 11:20:33 AM6/3/22
to AMPL Modeling Language
Usually, this error occurs because the file amplgsl.dll is not in the same folder as the file ampl.exe. So first, you should check that these files are in the same folder; if not, move amplgsl.dll into the same folder as ampl.exe.

If amplgsl.dll and ampl.exe are in the same folder, but you still get the "Cannot find library" message, then please provide the following information:
  • A screenshot of your AMPL folder, showing the files amplgsl.dll and ampl.exe.
  • A screenshot of your command or IDE window, showing what you typed and the error that appeared.


--
Robert Fourer
am...@googlegroups.com
{#HS:1907873442-110386#}

吴巧

unread,
Feb 15, 2024, 11:25:27 AMFeb 15
to AMPL Modeling Language
Hello
Today I install AMPL , but it show
 "Error executing "load" command:
Cannot find library "C:\Users\吴巧\Desktop\其他代做\AMPL\amplide\plugins\com.ampl.ide_4.0.0.202308171617\lib\amplsig.dll",
Through the method you introduced, I found that there is no "amplsig.dll" in my installation folder,there are "amplsig_64.dll" and "amplsig_32.dll".
By the way ,it always show "Can't find file "Q2.mod" context: model >>> Q2.mod <<<ampl: model Q2.mod;",but the model is in the main folder.
it would be really helpful if someone could help in solving this error.

THAnKS.

AMPL Google Group

unread,
Feb 15, 2024, 10:38:57 PMFeb 15
to AMPL Modeling Language
In order to understand the issue you are facing I'll ask you to reset the IDE: open the IDE and in the toolbar go to the "Window" tab and select "Reset and Restart IDE".
Afterwards I'll ask you to use the IDE and see what happens.

If the situation persists please send us the log file of AMPL IDE.
The log file is in:
  • Windows: ~\AppData\Local\amplide\.metadata\.log
  • Linux: ~/.config/amplide/.metadata/.log
  • OS X: ~/Library/Application Support/amplide/.metadata/.log
Note that the log file is hidden, you will have to change the visibility options to access it.


--
Nicolau Santos

We're switching to a new, enhanced user forum.
Join it now at discuss.ampl.com.
{#HS:1907873442-110386#}
On Thu, Feb 15, 2024 at 4:25 PM UTC, AMPL Modeling Language <am...@googlegroups.com> wrote:
Hello Today I install AMPL , but it show

"Error executing "load" command: Cannot find library "C:\Users\吴巧\Desktop\其他代做\AMPL\amplide\plugins\com.ampl.ide_4.0.0.202308171617\lib\amplsig.dll",

Through the method you introduced, I found that there is no "amplsig.dll" in my installation folder,there are "amplsig_64.dll" and "amplsig_32.dll".

By the way ,it always show "Can't find file "Q2.mod" context: model >>> Q2.mod <<<ampl: model Q2.mod;",but the model is in the main folder. it would be really helpful if someone could help in solving this error. THAnKS.

On Fri, Jun 3, 2022 at 3:19 PM UTC, AMPL Google Group <am...@googlegroups.com> wrote:
Usually, this error occurs because the file amplgsl.dll is not in the same folder as the file ampl.exe. So first, you should check that these files are in the same folder; if not, move amplgsl.dll into the same folder as ampl.exe.

If amplgsl.dll and ampl.exe are in the same folder, but you still get the "Cannot find library" message, then please provide the following information:
  • A screenshot of your AMPL folder, showing the files amplgsl.dll and ampl.exe.
  • A screenshot of your command or IDE window, showing what you typed and the error that appeared.


--
Robert Fourer

We're switching to a new, enhanced user forum.
Join it now at discuss.ampl.com.
Reply all
Reply to author
Forward
0 new messages