aniket-deole/notes

Compilation issue on ubuntu: 'expected class name before {'

Closed this issue · 2 comments

On ubuntu after all the dependent libraries are installed, when I try make, this shows up.

ubuntu: ~/notify-> make -f Makefile
g++ -g -rdynamic -O0 -Wall pkg-config sigc++-2.0 gtk+-3.0 gtkmm-3.0 gdkmm-3.0 webkitgtk-3.0 sqlite3 uuid --cflags-Ilib/ -Ilib/thrift/ -lssl -lcrypto -lpthread -c main.cc
In file included from windowbody.hh:22:0,
from notify.hh:22,
from main.cc:16:
maintoolbar.hh:24:43: error: expected class-name before ‘{’ token
class MainToolbar : public Gtk::HeaderBar {
^
make: *** [main.o] Error 1

This error is due to Gtk not being greater than 3.10.
A workaround for this error make not to appear is to create configure scripts (which would then create makefiles) that check whether all necessary packages are available and then alert the user about the absent ones.