alex-courtis / xlayoutdisplay

Detects and arranges linux display outputs, using XRandR for detection and xrandr for arrangement.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make error

SalomonAber opened this issue · comments

Make failed:

g++ -pedantic -Wall -Wextra -Werror -O3 -std=c++14  -DVERSION=\"1.1.3\"  -c -o src/xrdbutil.o src/xrdbutil.cpp
g++ -pedantic -Wall -Wextra -Werror -O3 -std=c++14  -DVERSION=\"1.1.3\"  -c -o src/xrandrrutil.o src/xrandrrutil.cpp
g++ -pedantic -Wall -Wextra -Werror -O3 -std=c++14  -DVERSION=\"1.1.3\"  -c -o src/layout.o src/layout.cpp
g++ -pedantic -Wall -Wextra -Werror -O3 -std=c++14  -DVERSION=\"1.1.3\"  -c -o src/Output.o src/Output.cpp
g++ -pedantic -Wall -Wextra -Werror -O3 -std=c++14  -DVERSION=\"1.1.3\"  -c -o src/Mode.o src/Mode.cpp
g++ -pedantic -Wall -Wextra -Werror -O3 -std=c++14  -DVERSION=\"1.1.3\"  -c -o src/Edid.o src/Edid.cpp
g++ -pedantic -Wall -Wextra -Werror -O3 -std=c++14  -DVERSION=\"1.1.3\"  -c -o src/calculations.o src/calculations.cpp
g++ -pedantic -Wall -Wextra -Werror -O3 -std=c++14  -DVERSION=\"1.1.3\"  -c -o src/Monitors.o src/Monitors.cpp
g++ -pedantic -Wall -Wextra -Werror -O3 -std=c++14  -DVERSION=\"1.1.3\"  -c -o src/xutil.o src/xutil.cpp
g++ -pedantic -Wall -Wextra -Werror -O3 -std=c++14  -DVERSION=\"1.1.3\"  -c -o main.o main.cpp
In file included from /usr/include/stdlib.h:42:0,
                 from /usr/include/c++/5/cstdlib:72,
                 from main.cpp:17:
main.cpp: In function ‘int main(int, const char**)’:
main.cpp:90:16: error: lvalue required as unary ‘&’ operand
         return WEXITSTATUS(layout(settings));
                ^
<builtin>: recipe for target 'main.o' failed
make: *** [main.o] Error 1

Fixed by converting WEXITSTATUS argument to lvalue:

// main.cpp
int layout_status = layout(settings);
return WEXITSTATUS(layout_status);