[gtk-list] Re: C++ et al

 Vladimir Myslik  
(if you experience delivery problems replying my mail, try the addresses below)
mailto:xmyslik@cslab.felk.cvut.cz , mailto:xmyslik@cs.felk.cvut.cz
On Fri, 2 May 1997, Chris Marston wrote:

> I'm going to pre-apologize for the stupidity in this next question. As a
> high school student without access to formal compsci teaching, I've been
> kind of bootstrapping myself along. This unfortunately includes dropping
> some annoying questions along the way. My question is this:
> Why won't my stupid C++ test app compile? <g>
> Here's what I get:
> /usr/local/include/gtk/gtkentry.h:64: parse error before 'delete'
> Seems to be one of those c vs c++ things. I was just curious whether I
> could be doing something to jiggle the compilation process along, or
> whether I'll have to wait for the C++ wrappers.

That's because C++ has the word 'delete' reserved. Even in header files 
for external c routines quoted by
extern "C" {  ...the external c routines defined as c (not c++).. }
the word cannot be used. I got around the problem by changing it from
delete to delete_ in gtkentry.h 
Hopefully nothing seems to be broken so far. I compiled my  bastardish C++ 
program with C only gtk well. Only the -lgtk is needed at compilation time.
You may ask the developers if they changed it throughout the sources 
(which I doubt) or suggest some solution....


> Thanks for putting up with such a dense question. :) 
>                                 Cheers, Chris
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> DOA_Web        == "http://www.albertashop.com/Barrhead/DOA/index.html";
> Geek_Code      == "http://www.albertashop.com/Barrhead/DOA/geek.txt";
> PGP_Public_Key == "http://www.albertashop.com/Barrhead/DOA/cmarston.pgp";
> /* Walking forward is the act of perpetually falling and catching yourself at the last moment*/ 
> Version: 2.6.3
> Charset: noconv
> iQB1AwUBM2rRpSGhZ7BcwgPNAQE3VQMAk1c+LH4nOM5DluLH1EjtBCv8xl1VdV8z
> coVBrfSwCZ5+7tZOwxQl7SRjLCzYTi4PQfX4UoaEseYVT6Nug0D8JWI9sSs/SBJV
> dafl2VXAZAQkyWVLIlYdnzofsp99ISnh
> =AwOC
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null

To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null

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