[Ipopt] Installed libipopt.so has undefined symbols

Andreas Waechter andreasw at watson.ibm.com
Tue May 26 10:49:20 EDT 2009

Hi Thomas,

Then you configure Ipopt, it finds out what other libraries it has to be 
linked with, and it puts this information into the example Makefiles, see 
in the LIBS variable, see, e.g.,


(where "YOUR_IPOPT_INST_DIR" is the directory where you installed Ipopt, 
usually where you run configure).

Alternatively, it also creates a file


which contains those libraries as text as well.

You can use that for example as in

g++ test.cc -lipopt `cat YOUR_IPOPT_INST_DIR/share/doc/coin/Ipopt/ipopt_addlibs_cpp.txt`

I hope this helps,


On Tue, 26 May 2009, Thomas Moulard wrote:

> Hello,
> When using Ipopt 3.6.1, I have to manually add the Lapack, pthread and
> gfortran library
> which is a real bother for me.
> Example:
> $ echo 'int main () {}' > test.cc
> $ g++ test.cc -lipopt
> /home/thomas/.local/lib/libipopt.so: undefined reference to `dsyev_'
> /home/thomas/.local/lib/libipopt.so: undefined reference to `pthread_create'
> /home/thomas/.local/lib/libipopt.so: undefined reference to `dpotrf_'
> /home/thomas/.local/lib/libipopt.so: undefined reference to `dpotrs_'
> /home/thomas/.local/lib/libipopt.so: undefined reference to `pthread_join'
> collect2: ld returned 1 exit status
> However, if I regenerate a library with the right dependencies:
> $ g++ -shared -pthread -llapack -lgfortran -lipopt -o libipopt2.so
> The following command is now working:
> $ g++ test.cc -lipopt2
> (some -L -rpath... flags have been removed to keep the commands clear)
> Would it be possible to fix that in the next release?
> It would really make the use/detection of Ipopt easier for the end-users.
> Thanks,
> -- 
> Thomas Moulard
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt

More information about the Ipopt mailing list