Build failed
Closed this issue · 11 comments
$ make
[ 3%] Building CXX object CMakeFiles/GacUIX11Cairo.dir/home/zshang/Program/XGac/X11Cairo/NativeWindow/Xlib/XlibNativeController.cpp.o
In file included from /usr/include/X11/Xlibint.h:42:0,
from /home/zshang/Program/XGac/X11Cairo/NativeWindow/Xlib/ServicesImpl/../XlibXRecordMouseHookHelper.h:8,
from /home/zshang/Program/XGac/X11Cairo/NativeWindow/Xlib/ServicesImpl/XlibNativeWindowService.h:7,
from /home/zshang/Program/XGac/X11Cairo/NativeWindow/Xlib/XlibNativeController.cpp:5:
/usr/include/X11/Xproto.h:458:5: error: declaration does not declare anything [-fpermissive]
BOOL override;
^
/usr/include/X11/Xproto.h:1063:6: error: declaration does not declare anything [-fpermissive]
BOOL override;
^
/usr/include/X11/Xproto.h:1087:6: error: declaration does not declare anything [-fpermissive]
BOOL override;
^
/usr/include/X11/Xproto.h:1098:6: error: declaration does not declare anything [-fpermissive]
BOOL override;
^
/usr/include/X11/Xproto.h:1106:6: error: declaration does not declare anything [-fpermissive]
BOOL override;
^
CMakeFiles/GacUIX11Cairo.dir/build.make:307: recipe for target 'CMakeFiles/GacUIX11Cairo.dir/home/zshang/Program/XGac/X11Cairo/NativeWindow/Xlib/XlibNativeController.cpp.o' failed
make[2]: *** [CMakeFiles/GacUIX11Cairo.dir/home/zshang/Program/XGac/X11Cairo/NativeWindow/Xlib/XlibNativeController.cpp.o] Error 1
CMakeFiles/Makefile2:311: recipe for target 'CMakeFiles/GacUIX11Cairo.dir/all' failed
make[1]: *** [CMakeFiles/GacUIX11Cairo.dir/all] Error 2
Makefile:76: recipe for target 'all' failed
make: *** [all] Error 2
The type BOOL used in Xproto should have been defined in Xmd.h. Could you check your Xmd.h and see if it includes the definition?
Should be something like
typedef unsigned char CARD8;
......
typedef CARD8 BOOL;
@milizhang
yes it does,
114 typedef unsigned char CARD8;
120 typedef CARD8 BOOL;
And since I have included Xmd.h it should not have this kind of problem.
I will investigate this issue from my side. What kind of environment are you testing on?
Arch Linux, everything is the latest version
Now I fully understand what exactly happened. override
is a C++ keyword.
I am surprised why I did not get this error before. Let me think about some way to fix this.
I didn't even realized that...what compiler do you use
I see...
(but how did you test it under Linux Mint and OS X
My bad. Because previously I only tested it under clang. gcc is quite slow when compiling the combined GacUI files.
Got it, I can help to test after you fix it, I'm gonna do homework now...