Sonobana
November 12th, 2006, 05:19 PM
Hello!
I have been learning writing c++, and now i want to learn make GUIs with gtkmm. First thing i realized was that compiling these programs is not so easy as i thinked. I also want learn make things 'right' so i think its better to ask.
so i use scons to compile my program.
heres simple example file that i found from gtkmm's tutorial:
#include <gtkmm.h>
int main(int argc, char *argv[])
{
Gtk::Main kit(argc, argv);
Gtk::Window window;
Gtk::Main::run(window);
return 0;
}
and my Sconstruct -file:
Program('main.cc')
and when i try to run scons this is the error:
~/Projects/scons-koe
23:11:50 <samuli@samuli-desktop> scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o main.o -c main.cc
main.cc:1:19: error: gtkmm.h: No such file or directory
main.cc: In function 'int main(int, char**)':
main.cc:5: error: 'Gtk' has not been declared
main.cc:5: error: expected `;' before 'kit'
main.cc:7: error: 'Gtk' has not been declared
main.cc:7: error: expected `;' before 'window'
main.cc:9: error: 'Gtk' has not been declared
main.cc:9: error: 'window' was not declared in this scope
scons: *** [main.o] Error 1
scons: building terminated because of errors.
How i get my programs done?
I have been learning writing c++, and now i want to learn make GUIs with gtkmm. First thing i realized was that compiling these programs is not so easy as i thinked. I also want learn make things 'right' so i think its better to ask.
so i use scons to compile my program.
heres simple example file that i found from gtkmm's tutorial:
#include <gtkmm.h>
int main(int argc, char *argv[])
{
Gtk::Main kit(argc, argv);
Gtk::Window window;
Gtk::Main::run(window);
return 0;
}
and my Sconstruct -file:
Program('main.cc')
and when i try to run scons this is the error:
~/Projects/scons-koe
23:11:50 <samuli@samuli-desktop> scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o main.o -c main.cc
main.cc:1:19: error: gtkmm.h: No such file or directory
main.cc: In function 'int main(int, char**)':
main.cc:5: error: 'Gtk' has not been declared
main.cc:5: error: expected `;' before 'kit'
main.cc:7: error: 'Gtk' has not been declared
main.cc:7: error: expected `;' before 'window'
main.cc:9: error: 'Gtk' has not been declared
main.cc:9: error: 'window' was not declared in this scope
scons: *** [main.o] Error 1
scons: building terminated because of errors.
How i get my programs done?