bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix build breaks in ncurses c++ binding


From: Adam Jiang
Subject: Re: Fix build breaks in ncurses c++ binding
Date: Sat, 2 Aug 2014 12:13:50 +0900

It’s gcc shipped with Xcode.

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr 
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.3.0
Thread model: posix

Error messages look like

/usr/bin/g++ -I../c++ -I../include -I. -DHAVE_CONFIG_H   -D_DARWIN_C_SOURCE 
-DNDEBUG -I. -I../include -I/usr/local/include/ncurses -O2  -c 
../c++/cursesf.cc -o ../objects/cursesf.o
In file included from ../c++/cursesf.cc:35:
../c++/cursesf.h:685:7: error: no matching constructor for initialization of 
'NCursesForm'
    : NCursesForm (Fields, with_frame, autoDelete_Fields) {
      ^            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../c++/cursesf.h:420:3: note: candidate constructor not viable: no known 
conversion from 'NCursesFormField *' to 'NCursesFormField **' for 1st argument; 
take the address of the
      argument with &
  NCursesForm (NCursesFormField* Fields[],

The issue could not be reproduced if ‘—disable-debug’ is set with ‘./configure’ 
script.

One another error could be triggered by code

class UserData;
typedef NCursesUserPanel<UserData>;
typedef NCursesUserMenu<UserData>;

The constructor of NCursesUserPanel will call ‘set_user(void*)’. So that, 
‘UserData’ has to be converted to ‘void *’, which could not be simply done by 
‘const_cast’.

On 2014年8月2日, at 上午8:45, Thomas Dickey <address@hidden> wrote:

> On Sat, Aug 02, 2014 at 12:11:52AM +0900, Adam Jiang wrote:
>> This patch fixes building breaks in c++ directory.
> 
> for which compiler (and version) does it break?
> 
> -- 
> Thomas E. Dickey <address@hidden>
> http://invisible-island.net
> ftp://invisible-island.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]