i'd compile c program using sdl library on ubuntu.
i error compiler:
undefined reference `sdl_freesurface'.
as other undefined references.
like thurizas says, "undefined reference" means external function or variable use cannot found linker (the part of compiler pieces code objects final program). means forgot link library, or linker found wrong version of library.
in case should add "-lsdl2" compiler command line means "link libsdl2.so". necessary in addition #including header files. standard c library (libc.so) linked in default (-lc).
Comments
Post a Comment