Error while compiling, (using a 3rd party header file.) (olcPixelGameEngine) in Ubuntu 20.04

153 Views Asked by At

I am using a header file named OlcPixelGameEngine, and one more header file, but when I run the compile command, I get a big error.

This is the command to compile the cpp program.

g++ main.cpp -o main -luser32 -lgdi32 -lopengl32 -lgdiplus -lShlwapi -lstdc++fs -static -std=c++17 -lxinput9_1_0 -lole32 -loleaut32 -ldinput8 -ldxguid -ldwmapi

and this is the error:-

/usr/bin/ld: cannot find -luser32
/usr/bin/ld: cannot find -lgdi32
/usr/bin/ld: cannot find -lopengl32
/usr/bin/ld: cannot find -lgdiplus
/usr/bin/ld: cannot find -lShlwapi
/usr/bin/ld: cannot find -lxinput9_1_0
/usr/bin/ld: cannot find -lole32
/usr/bin/ld: cannot find -loleaut32
/usr/bin/ld: cannot find -ldinput8
/usr/bin/ld: cannot find -ldxguid
/usr/bin/ld: cannot find -ldwmapi
collect2: error: ld returned 1 exit status

I am using Linux, Ubuntu 20.04.

0

There are 0 best solutions below