libftdi Archives

Subject: Re: [patch] fix compile with boost

From: "John Hein" <47vzntyus9@xxxxxxxxxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Tue, 28 May 2013 07:48:17 -0600
Thomas Jarosch wrote at 14:45 +0200 on May 28, 2013:
 > On Tuesday, 28. May 2013 05:43:33 John Hein wrote:
 > > When building examples/find_all_cpp.o, the attached patch will add
 > > -I flags for boost header files.
 > >
 > > Without it, you can get this when building examples/find_all_pp...
 > >
 > > In file included from find_all_pp.cpp:8:
 > > .../ftdipp/ftdi.hpp:34:32: error: boost/shared_ptr.hpp: No such file or
 > > directory In file included from find_all_pp.cpp:8:
 > > .../ftdipp/ftdi.hpp:144: error: 'boost' has not been declared
 > > .../ftdipp/ftdi.hpp:144: error: ISO C++ forbids declaration of
 > > 'shared_ptr' with no type
 >
 > thanks for you patch. I'm not sure this is the correct fix:
 > The pkgconfig stuff for libftdipp should provide the boost includes
 > automatically. Otherwise every program using it
 > must manually specify the BOOST_CFLAGS...
 >
 > What do you think?

Do you mean the build should use its own in-tree copy of libftdipp.pc
to set -I flags when building libftdi itself?

libftdipp.pc.in would have to be modified to include -I flags for
boost, but I can't think of a great way to have autoconf use
pkg-config to look for the in-tree .pc file at the moment.  Is there a
simple autoconf-ish way to do that? Seems much easier to just include
BOOST_CPPFLAGS in Makefile.am.

Modifying libftdipp.pc.in to include -I /path/to/boost/include
certainly seems reasonable for consumers of libftdi that might include
ftdi.hpp (which currently requires boost).

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread