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: Thomas Dickey
Subject: Re: Fix build breaks in ncurses c++ binding
Date: Sat, 02 Aug 2014 08:33:21 -0400
User-agent: Mutt/1.5.20 (2009-06-14)

On Sat, Aug 02, 2014 at 12:13:50PM +0900, Adam Jiang wrote:
> 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

no... that's clang (someone should give the Apple developers a clue).

Actually, I have that version here, but haven't seen those warnings.
(looking at the moment, I see a problem with my configuration for shared
libraries, but that's a different matter).

Are you using the latest beta of Xcode, for instance?
(I haven't done anything with that).

Alternatively, it could be a problem with clang versus a very-recent set of 
headers,
I have the MacPort for gcc48, and declined the gcc49 port since it appears 
buggy.
 
> 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

-- 
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net

Attachment: signature.asc
Description: Digital signature


reply via email to

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