[Ipopt] Ipopt include files

Brad Bell bradbell at seanet.com
Mon Dec 31 07:51:25 EST 2012

I am attaching a shell script that demonstrates the problem. You will 
need to change the assignment
to the proper prefix for the installation of Ipopt on your system. The 
result I get when I execute the attached script is:

[bradbell at brad trash]$ ./ipopt_include_question.sh
g++ ipopt_include_question.cpp -o ipopt_include_question 
undefined reference to `Ipopt::Vector::AddTwoVectorsImpl(double, 
Ipopt::Vector const&, double, Ipopt::Vector const&, double)'
undefined reference to `Ipopt::Vector::FracToBoundImpl(Ipopt::Vector 
const&, double) const'
undefined reference to `Ipopt::Vector::AddVectorQuotientImpl(double, 
Ipopt::Vector const&, Ipopt::Vector const&, double)'
undefined reference to `Ipopt::Vector::HasValidNumbersImpl() const'
collect2: error: ld returned 1 exit status
[bradbell at brad trash]$

On 12/30/2012 07:36 AM, Stefan Vigerske wrote:
> Hi,
> On 12/30/2012 02:47 PM, Brad Bell wrote:
>> I have a template class header file that includes the files
>>      # include <coin/IpIpoptApplication.hpp>
>>      # include <coin/IpTNLP.hpp>
>> I never use the template class, so even though I define it, I do not
>> expect to need Ipopt to link the corresponding program. The problem is
>> that it appears that the Ipopt include files listed above are not pure
>> definitions; i.e., they are actually building code that requires the
>> Ipopt library to link ?
> These two header files include a number of other files.
> Can you be more specific what code they are building? Which symbols do 
> they define?
> Stefan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipopt_include_question.sh
Type: application/x-shellscript
Size: 606 bytes
Desc: not available
URL: <http://list.coin-or.org/pipermail/ipopt/attachments/20121231/5d1dcc20/attachment.bin>

More information about the Ipopt mailing list