Re: In need of C++ gurus

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

 



On Mon, Feb 20, 2017 at 09:15:46AM +0100, Jan Synacek wrote:
> Hi,
> 
> warzone2100 fails to build [1] and I have no idea how to fix that.
> Most of the errors are:
> 
> main_sdl.cpp:79:13: error: expected unqualified-id before '__attribute__'
>  static std::vector<screeninfo> displaylist; // holds all our possible
> display lists
>              ^
> main_sdl.cpp:117:29: error: cannot convert 'bool' to '__vector(4)
> __bool int' in initialization
>  static bool mouseInWindow = true;
>                              ^~~~
> main_sdl.cpp:148:22: error: cannot convert 'bool' to '__vector(4)
> __bool int' in initialization
>  bool GetTextEvents = false;
>                       ^~~~~
> 
> Could someone point me in the right direction? I've looked at [2], but
> that doesn't seem to help much in this case.

That looks like C++ and altivec.h on PowerPC.  altivec.h changes the
meaning of bool and vector keywords, so it is essential in what order
and what mode you include it if you really need it (easiest is of course
not include it at all).  In general, for the non-ISO modes (i.e.
-std=gnu++98, -std=gnu++11, -std=gnu++14, -std=gnu++17 etc.) altivec.h
and preprocessor uses for these two context sensitive preprocessing, which
usually works with most of the C++ code, while if you compile in strict ISO
modes (-std=c++98, -std=c++11, -std=c++14, -std=c++17 etc.), then altivec.h
redefines vector and bool to the altivec.h stuff, so in that case you must
not include any standard C++ headers after including altivec.h and avoid
bool/vector or #undef them if you want the standard C++ meaning of those
(bool keyword and std::vector).

So if you are using -std=c++* mode, easiest fix is to change it to
-std=gnu++* mode.  Otherwise you need to provide more details.

	Jakub
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux