Closed briefe77 closed 7 years ago
You are probably using an old valac version with a more recent version of GLib. I advice you to install a newer version of valac and the corresponding vapi files.
If you insist on building Go For It on your current setup: remove
# checking if we have a recent version of GLib
pkg_check_modules( GLIB2 glib-2.0 )
if (${GLIB2_VERSION} VERSION_GREATER 2.40 )
set (VALAC_OPTIONS ${VALAC_OPTIONS} -D HAS_GLIB241)
else ()
message ("-- No recent glib-2.0 found")
endif ()
from CMakeLists.txt
Go for it! now uses GLib.FileUtils.set_contents instead of GLib.KeyFile.save_to_file, so this issue won't occur anymore. (GLib.FileUtils.set_contents has been available since GLib 2.8, which was released in 2005. So it should be available everywhere.)
root@ubuntu:/home/alexei/Go-For-It-master/build# make [ 7%] Generating src/Utils.c;src/SettingsManager.c;src/TaskStore.c;src/TaskManager.c;src/view/TaskList.c;src/TaskTimer.c;src/view/TimerView.c;src/view/SettingsDialog.c;src/view/AboutDialog.c;src/view/ContributeDialog.c;src/view/MainWindow.c;src/Main.c /home/alexei/Go-For-It-master/src/SettingsManager.vala:194.9-194.29: error: The name
save_to_file' does not exist in the context of
GLib.KeyFile' key_file.save_to_file (GOFI.Utils.config_file); ^^^^^^^^^^^^^^^^^^^^^ Compilation failed: 1 error(s), 0 warning(s) make[2]: * [go-for-it_valac.stamp] Ошибка 1 make[1]: * [CMakeFiles/go-for-it.dir/all] Ошибка 2 make: *\ [all] Ошибка 2