<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>Hi all,<br>
</span>
<div><br>
</div>
<div>Hi all, I just fixed the problem.<br>
</div>
<div><br>
</div>
<div>Use the following code to compile:<br>
</div>
<div><br>
</div>
<div>gfortran hs071.f90 -o hs071.out -L /usr/local/lib -lipopt -g -Wall -fcheck=all<br>
</div>
<div><br>
</div>
<div>But notice that if your library of IPOPT is 64-bit, need to change the code from<br>
</div>
<div><br>
</div>
<div>integer IPROBLEM<br>
</div>
<div>integer IPCREATE<br>
</div>
<div>into<br>
</div>
<div><br>
</div>
<div>integer*8 IPROBLEM<br>
</div>
<div>integer*8 IPCREATE<br>
</div>
<div><br>
</div>
<span>Hope this thread can help someone!</span><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Wang, Yajie<br>
<b>Sent:</b> Sunday, January 26, 2020 8:57 AM<br>
<b>To:</b> ipopt@list.coin-or.org <ipopt@list.coin-or.org><br>
<b>Subject:</b> Questions About Fortran 90 Interface</font>
<div> </div>
</div>
<style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<p style="box-sizing:border-box; margin-top:0px!important; margin-bottom:16px; color:rgb(36,41,46); font-size:14px; background-color:rgb(255,255,255)">
Hi, all!</p>
<p style="box-sizing:border-box; margin-top:0px; margin-bottom:16px; color:rgb(36,41,46); font-size:14px; background-color:rgb(255,255,255)">
I have tried the pyipopt to run IPOPT. That works well.</p>
<p style="box-sizing:border-box; margin-top:0px; margin-bottom:16px; color:rgb(36,41,46); font-size:14px; background-color:rgb(255,255,255)">
I am using Fortran 90 now. I look into hs071_f for the Fortran interface. I guess it is written in Fortran 77? Unfortunately, I really don't understand.</p>
<p style="box-sizing:border-box; margin-top:0px; margin-bottom:16px; color:rgb(36,41,46); font-size:14px; background-color:rgb(255,255,255)">
I was wondering whether there was a Fortran 90 interface?</p>
<div style="box-sizing:border-box; margin-top:0px; color:rgb(36,41,46); font-size:14px; background-color:rgb(255,255,255); margin-bottom:0px">
<p style="box-sizing:border-box; margin-top:0px!important; margin-bottom:16px; background-color:rgb(255,255,255)">
Though I just found a Fortran90 Interface Source from<span> </span><a rel="nofollow" href="http://apmonitor.com/wiki/index.php/Main/DownloadIpopt" style="box-sizing:border-box; color:rgb(3,102,214)">http://apmonitor.com/wiki/index.php/Main/DownloadIpopt</a>, <span style="color:rgb(36,41,46); font-size:14px">I
 cannot build it. It is because I am using Mac but the source is for Windows?</span></p>
<p style="box-sizing:border-box; margin-top:0px; margin-bottom:16px; background-color:rgb(255,255,255)">
Errors:</p>
<p style="box-sizing:border-box; margin-top:0px; margin-bottom:0px!important; background-color:rgb(255,255,255)">
<code style="box-sizing:border-box; font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace; font-size:11.9px; padding:0.2em 0.4em; margin:0px; background-color:rgba(27,31,35,0.05); border-radius:3px">gfortran hs071.f90 -o vfi.out -fbounds-check
 -O2</code><br style="box-sizing:border-box">
<code style="box-sizing:border-box; font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace; font-size:11.9px; padding:0.2em 0.4em; margin:0px; background-color:rgba(27,31,35,0.05); border-radius:3px">Undefined symbols for architecture x86_64:</code><br style="box-sizing:border-box">
<code style="box-sizing:border-box; font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace; font-size:11.9px; padding:0.2em 0.4em; margin:0px; background-color:rgba(27,31,35,0.05); border-radius:3px">"_ipaddintoption_", referenced from:</code><br style="box-sizing:border-box">
<code style="box-sizing:border-box; font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace; font-size:11.9px; padding:0.2em 0.4em; margin:0px; background-color:rgba(27,31,35,0.05); border-radius:3px">_MAIN__ in cculABQh.o</code><br style="box-sizing:border-box">
<code style="box-sizing:border-box; font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace; font-size:11.9px; padding:0.2em 0.4em; margin:0px; background-color:rgba(27,31,35,0.05); border-radius:3px">"_ipaddnumoption_", referenced from:</code><br style="box-sizing:border-box">
<code style="box-sizing:border-box; font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace; font-size:11.9px; padding:0.2em 0.4em; margin:0px; background-color:rgba(27,31,35,0.05); border-radius:3px">_MAIN__ in cculABQh.o</code><br style="box-sizing:border-box">
<code style="box-sizing:border-box; font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace; font-size:11.9px; padding:0.2em 0.4em; margin:0px; background-color:rgba(27,31,35,0.05); border-radius:3px">"_ipaddstroption_", referenced from:</code><br style="box-sizing:border-box">
<code style="box-sizing:border-box; font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace; font-size:11.9px; padding:0.2em 0.4em; margin:0px; background-color:rgba(27,31,35,0.05); border-radius:3px">_MAIN__ in cculABQh.o</code><br style="box-sizing:border-box">
<code style="box-sizing:border-box; font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace; font-size:11.9px; padding:0.2em 0.4em; margin:0px; background-color:rgba(27,31,35,0.05); border-radius:3px">"_ipcreate_", referenced from:</code><br style="box-sizing:border-box">
<code style="box-sizing:border-box; font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace; font-size:11.9px; padding:0.2em 0.4em; margin:0px; background-color:rgba(27,31,35,0.05); border-radius:3px">_MAIN__ in cculABQh.o</code><br style="box-sizing:border-box">
<code style="box-sizing:border-box; font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace; font-size:11.9px; padding:0.2em 0.4em; margin:0px; background-color:rgba(27,31,35,0.05); border-radius:3px">"_ipfree_", referenced from:</code><br style="box-sizing:border-box">
<code style="box-sizing:border-box; font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace; font-size:11.9px; padding:0.2em 0.4em; margin:0px; background-color:rgba(27,31,35,0.05); border-radius:3px">_MAIN__ in cculABQh.o</code><br style="box-sizing:border-box">
<code style="box-sizing:border-box; font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace; font-size:11.9px; padding:0.2em 0.4em; margin:0px; background-color:rgba(27,31,35,0.05); border-radius:3px">"_ipopenoutputfile_", referenced from:</code><br style="box-sizing:border-box">
<code style="box-sizing:border-box; font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace; font-size:11.9px; padding:0.2em 0.4em; margin:0px; background-color:rgba(27,31,35,0.05); border-radius:3px">_MAIN__ in cculABQh.o</code><br style="box-sizing:border-box">
<code style="box-sizing:border-box; font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace; font-size:11.9px; padding:0.2em 0.4em; margin:0px; background-color:rgba(27,31,35,0.05); border-radius:3px">"_ipsolve_", referenced from:</code><br style="box-sizing:border-box">
<code style="box-sizing:border-box; font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace; font-size:11.9px; padding:0.2em 0.4em; margin:0px; background-color:rgba(27,31,35,0.05); border-radius:3px">_MAIN__ in cculABQh.o</code><br style="box-sizing:border-box">
<code style="box-sizing:border-box; font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace; font-size:11.9px; padding:0.2em 0.4em; margin:0px; background-color:rgba(27,31,35,0.05); border-radius:3px">ld: symbol(s) not found for architecture x86_64</code><br style="box-sizing:border-box">
<code style="box-sizing:border-box; font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,monospace; font-size:11.9px; padding:0.2em 0.4em; margin:0px; background-color:rgba(27,31,35,0.05); border-radius:3px">collect2: error: ld returned 1 exit status</code></p>
<br>
</div>
<div style="box-sizing:border-box; margin-top:0px; color:rgb(36,41,46); font-size:14px; background-color:rgb(255,255,255); margin-bottom:0px">
Looking forward to any advice! Thanks in advance.</div>
<div style="box-sizing:border-box; margin-top:0px; color:rgb(36,41,46); font-size:14px; background-color:rgb(255,255,255); margin-bottom:0px">
<br>
</div>
<div style="box-sizing:border-box; margin-top:0px; color:rgb(36,41,46); font-size:14px; background-color:rgb(255,255,255); margin-bottom:0px">
Best wishes,</div>
<div style="box-sizing:border-box; margin-top:0px; color:rgb(36,41,46); font-size:14px; background-color:rgb(255,255,255); margin-bottom:0px">
<br>
</div>
<div style="box-sizing:border-box; margin-top:0px; color:rgb(36,41,46); font-size:14px; background-color:rgb(255,255,255); margin-bottom:0px">
Yajie</div>
</div>
</div>
</body>
</html>