Try changeing the order of files in add_executable
add_executable(a2-dragos12312-1 "c files/ui.c" "c files/main.c")