finally build, needed -pthread flag and GL, libpthread and libdl libraries