Manuel-Kehl / Go-For-It

A stylish to-do list with built-in productivity timer. NOTE: all contributions should go to Jonathan Moerman's fork because this is where active development is taking place: https://github.com/JMoerman/Go-For-It
http://manuel-kehl.de/projects/go-for-it/
GNU General Public License v3.0
516 stars 51 forks source link

Compiling problem #80

Closed briefe77 closed 7 years ago

briefe77 commented 8 years ago

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 ofGLib.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

JMoerman commented 8 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

JMoerman commented 7 years ago

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.)