error with gtkmm 3 in ubuntu 12.04
Posted
by
Grohiik
on Stack Overflow
See other posts from Stack Overflow
or by Grohiik
Published on 2012-06-18T01:21:33Z
Indexed on
2012/06/25
21:16 UTC
Read the original article
Hit count: 313
i install libgtkmm-3.0-dev in ubuntu 12.04 and i try to learn and write program with c++ and gtkmm 3 i go to this link "http://developer.gnome.org/gtkmm-tutorial/unstable/sec-basics-simple-example.html.en" and try to compile simple example program :
#include <gtkmm.h>
int main(int argc, char *argv[])
{
Glib::RefPtr<Gtk::Application> app =
Gtk::Application::create(argc, argv,
"org.gtkmm.examples.base");
Gtk::ApplicationWindow window;
return app->run(window);
}
my file name is "basic.cc" and i open terminal and type following command to compile:
g++ basic.cc -o basic `pkg-config gtkmm-3.0 --cflags --libs`
compile completed without any error but when i try to run program with type ./basic in terminal i get following error :
~$ ./simple
./simple: symbol lookup error: ./simple: undefined symbol:_ZN3Gtk11Application6createERiRPPcRKN4Glib7ustringEN3Gio16ApplicationFlagsE
~$
how can i solve this problem ?
i can cimpile any gtkmm 2.4 code with this command : " g++ basic.cc -o basic pkg-config gtkmm-3.0 --cflags --libs
"
and this command : " g++ basic.cc -o basic pkg-config gtkmm-2.4 --cflags --libs
"
thanks
© Stack Overflow or respective owner