On Thursday 05 March 2015 12:39:14 Antonio Larrosa wrote:
Hello,
I have a problem compiling an application (kde4-kupdateapplet) to which I'm adding some code that uses libzypp. When compiling, I'm getting this error: http://paste.opensuse.org/36038415
It seems to be related to the for_ definition in libzypp 9.37.10-0.8.1.10 (which is what SLES11-SP3 is using) as:
#define for_(IT,BEG,END) for ( typeof(BEG) IT = BEG, _for_end = END; IT != _for_end; ++IT )
Sorry, my fault.
[https://gcc.gnu.org/onlinedocs/gcc/Typeof.html]
...
If you are writing a header file that must work when included in
ISO C programs, write __typeof__ instead of typeof.
'typeof' is a gcc extension. It's turned off because you're using 'c++ -ansi'.
- Either drop using -ansi
- or change the header to use __typeof__
- or maybe
#define typeof __typeof__
#include