I'm a beginner at using Linux, so I'm following a couple of forum threads I've read so far.
I'm trying to compile a C++ program using g++
version 11.3.1
, where I have installed SDL2 using the command sudo apt-get install libsdl2-dev
and am using the recommended proprietary driver nvidia-driver-525
for my nvidia gtx 1060 graphics card. When I echo $XDG_SESSION_TYPE
, it says x11
.
However, when I compile the program using the link arguments -lSDL2
, it gives me the following compile error:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/11/../../../x86_64-linux-gnu/libSDL2.so: undefined reference to `wl_proxy_marshal_flags' collect2: error: ld returned 1 exit status
When I compile the program with the link arguments: -lSDL2 -lwayland-egl -lwayland-client -lwayland-cursor
, it compiles successfully. But then when I try to run the program, it gives me this error:
./bin/main.exe: symbol lookup error: /usr/lib/x86_64-linux-gnu/libdecor-0.so.0: undefined symbol: wl_proxy_marshal_flags