Opened 8 years ago
Closed 8 years ago
#10863 closed Bugs (fixed)
Geometry and asio includes cause compilation errors.
| Reported by: | Owned by: | Barend Gehrels | |
|---|---|---|---|
| Milestone: | Boost 1.58.0 | Component: | geometry |
| Version: | Boost 1.57.0 | Severity: | Problem |
| Keywords: | Cc: |
Description
Including
#include <boost/asio.hpp> #include <boost/geometry.hpp>
causes compilation errors. Everything is fine if includes are reordered:
#include <boost/geometry.hpp> #include <boost/asio.hpp>
Error also ocurres in boost 1.56.0. Boost 1.55.0 is fine.
Attachments (3)
Change History (8)
comment:1 by , 8 years ago
by , 8 years ago
| Attachment: | suse-gcc-4.8-boost-1.56.txt added |
|---|
by , 8 years ago
| Attachment: | arm-gcc-4.9-boost-1.56.txt added |
|---|
by , 8 years ago
| Attachment: | arm-gcc-4.9-boost-1.57.0.txt added |
|---|
comment:2 by , 8 years ago
I compiled your example on my machine and attached my compiler output. I still get the error. I compiled your code with following configurations:
- gcc 4.8.3 and boost 1.56 (suse-gcc-4.8-boost-1.56.txt)
- cross gcc for arm 4.9.1 and boost 1.56 (arm-gcc-4.9-boost-1.56.txt)
- cross gcc for arm 4.9.1 and boost 1.57.0 (arm-gcc-4.9-boost-1.57.0.txt)
However your code compiles if I use boost 1.55 with both compilers. I hope that helps.
comment:4 by , 8 years ago
Likely caused by POSIX termios.h which #defines B0 and similar constants.
comment:5 by , 8 years ago
| Milestone: | To Be Determined → Boost 1.58.0 |
|---|---|
| Resolution: | → fixed |
| Status: | new → closed |
This is a duplicate of https://svn.boost.org/trac/boost/ticket/10467
Fixed in develop: https://github.com/boostorg/geometry/commit/5fad5e3b7db2f980c13fdf4b07aaad7876f4c364

It's surprising. Could you provide more information? What compiler are you using? Could you prepare some short but complete example of a failing code? Or at least paste the compiler output.
I can't reproduce the problem. My code is very simple though. It compiles in msvc10 and mingw4.9.1.
#include <boost/asio.hpp> #include <boost/geometry.hpp> #include <boost/geometry/geometries/point.hpp> namespace bg = boost::geometry; int main() { boost::asio::io_service io_service; using boost::asio::ip::tcp; tcp::resolver resolver(io_service); tcp::resolver::query query(tcp::v4(), "127.0.0.1", "7"); bg::model::point<double, 2, bg::cs::cartesian> p1, p2; bg::equals(p1, p2); }