user294664
user294664

Reputation: 127

"cannot find stddef.h" error when compiling Ipopt example in ubuntu 16.04

I installed Ipopt debian package in ubuntu 16.04. When I tried to do an example problem given in the Ipopt documentation, I'm getting the following error

/usr/include/coin/IpSmartPtr.hpp:18: error: #error "don't have header file for stddef"

I hope some it is some dependency issue. How do I solve this?

Upvotes: 1

Views: 1950

Answers (1)

Dark Sorrow
Dark Sorrow

Reputation: 1937

I can work around this by either doing

#define HAVE_CSTDDEF
#include <IpTNLP.hpp>
#undef HAVE_CSTDDEF

or

#define HAVE_STDDEF_H
#include <IpTNLP.hpp>
#undef HAVE_STDDEF_H

Try this link.

Upvotes: 1

Related Questions