Opened 14 years ago

Closed 14 years ago

#2156 closed Bugs (fixed)

ncurses.h and boost.asio problem

Reported by: Rubén Lara <bermejator@…> Owned by: chris_kohlhoff
Milestone: Boost 1.36.0 Component: asio
Version: Boost 1.35.0 Severity: Problem
Keywords: ncurses.h Cc:

Description

Hi all!

To reproduce:

#include <boost/asio.hpp>
#include <ncurses.h>

If i try to include both libraries together i get next error:

$ g++ -lncurses -lboost_system -lboost_thread -o main *.cpp /usr/include/boost/asio/detail/socket_option.hpp:242: error: ‘stdscr’ is not a type /usr/include/boost/asio/detail/socket_option.hpp:252: error: ‘stdscr’ is not a type /usr/include/boost/asio/detail/socket_option.hpp:252: error: expected identifier before ‘)’ token

Change History (3)

comment:1 by Douglas Gregor, 14 years ago

Component: CMakeasio
Owner: changed from Douglas Gregor to chris_kohlhoff

in reply to:  description comment:2 by Rubén Lara <bermejator@…>, 14 years ago

Same with svn version 47889 revision:

bermejo@BERMEJO-MOBILE ~/Proyecto/boost $ !g++ g++ -lncurses -lboost_system -lboost_thread -o main *.cpp /usr/include/boost/asio/detail/socket_option.hpp:242: error: ‘stdscr’ is not a type /usr/include/boost/asio/detail/socket_option.hpp:252: error: ‘stdscr’ is not a type /usr/include/boost/asio/detail/socket_option.hpp:252: error: expected identifier before ‘)’ token

Rubén Lara

comment:3 by chris_kohlhoff, 14 years ago

Resolution: fixed
Status: newclosed

(In [52412]) Fix incompatibility between asio and ncurses.h due to the latter defining a macro called "timeout". Fixes #2156.

Note: See TracTickets for help on using tickets.