Summary of Fixes:
-- Change library order (move -lX11 and -lGL to the end). -- Explicitly add -lGLX for missing glX* functions. -- Install libx11-dev, libgl1-mesa-dev, libglu1-mesa-dev, libglew-dev, freeglut3-dev. -- Remove -static-libstdc++ if needed. -- Ensure DISPLAY is set properly in WSL.