Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm starting to write a C++ interface application using Glade as generator. I'm using a Slackware 10.1 distribution with kernel 2.4.29 and glade 2.6.0. To be able to obtain C++ code I've installed the following libraries:
gtkmm-2.4.8
glibmm-2.4.8
libsigc++-2.0.9
libglademm-2.4.2
Now Glade generates my C++ code and the autogen.sh script to create the Makefile.
The problem is that when I try to compile the code using "make", I have this error:
make all-recursive
make[1]: Entering directory `/root/Project/3kvp'
Making all in src
make[2]: Entering directory `/root/Project/3kvp/src'
make[2]: *** No rule to make target `3kvp.c', needed by `3kvp.o'. Stop.
make[2]: Leaving directory `/root/Project/3kvp/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/Project/3kvp'
make: *** [all] Error 2
It seems that the complier is tryng to compile a .c file but my source file is a .cc file.
Thank you Leonscape.
I've followed your suggestion and I'm sure I use g++, but now I have a problem with library path.
When I try to compile the error message is:
make all-recursive
make[1]: Entering directory `/root/Project/3kvp'
Making all in src
make[2]: Entering directory `/root/Project/3kvp/src'
g++ -g -O2 -c -o 3kvp.o 3kvp.cc
3kvp.cc:8:20: config.h: No such file or directory
3kvp.cc:9:24: gtkmm/main.h: No such file or directory
In file included from Window1.hh:13,
from 3kvp.cc:11:
Window1_glade.hh:21:30: gtkmm/accelgroup.h: No such file or directory
In file included from Window1.hh:13,
from 3kvp.cc:11:
Window1_glade.hh:26: error: syntax error before `::' token
Window1_glade.hh:29: error: parse error before `::' token
Window1_glade.hh:31: error: missing ';' before right brace
Window1_glade.hh:33: error: ISO C++ forbids defining types within return type
Window1_glade.hh:33: error: syntax error before `::' token
Window1_glade.hh:39:26: gtkmm/window.h: No such file or directory
Window1_glade.hh:40:29: gtkmm/separator.h: No such file or directory
Window1_glade.hh:41:25: gtkmm/label.h: No such file or directory
Window1_glade.hh:42:28: gtkmm/textview.h: No such file or directory
Window1_glade.hh:43:25: gtkmm/ruler.h: No such file or directory
Window1_glade.hh:44:31: gtkmm/progressbar.h: No such file or directory
Window1_glade.hh:45:31: gtkmm/drawingarea.h: No such file or directory
Window1_glade.hh:46:31: gtkmm/radiobutton.h: No such file or directory
Window1_glade.hh:47:32: gtkmm/togglebutton.h: No such file or directory
Window1_glade.hh:48:26: gtkmm/button.h: No such file or directory
Window1_glade.hh:49:25: gtkmm/fixed.h: No such file or directory
Window1_glade.hh:51: error: `Gtk' is not a class or namespace
Window1_glade.hh:52: error: `Window' is not a class or namespace
Window1_glade.hh:52: error: invalid base-class specification
Window1_glade.hh:56: error: invalid use of `::'
Window1_glade.hh:56: error: parse error before `*' token
Window1_glade.hh:57: error: no type named `HSeparator' in `struct Gtk'
Window1_glade.hh:58: error: no type named `Label' in `struct Gtk'
Window1_glade.hh:59: error: no type named `TextView' in `struct Gtk'
Window1_glade.hh:60: error: no type named `TextView' in `struct Gtk'
Window1_glade.hh:61: error: no type named `Label' in `struct Gtk'
Window1_glade.hh:62: error: no type named `Label' in `struct Gtk'
Window1_glade.hh:63: error: no type named `TextView' in `struct Gtk'
Window1_glade.hh:64: error: no type named `VSeparator' in `struct Gtk'
Window1_glade.hh:65: error: no type named `TextView' in `struct Gtk'
Window1_glade.hh:66: error: no type named `HRuler' in `struct Gtk'
Window1_glade.hh:67: error: no type named `VRuler' in `struct Gtk'
Window1_glade.hh:68: error: no type named `ProgressBar' in `struct Gtk'
Window1_glade.hh:69: error: no type named `DrawingArea' in `struct Gtk'
Window1_glade.hh:70: error: no type named `TextView' in `struct Gtk'
Window1_glade.hh:71: error: no type named `Label' in `struct Gtk'
Window1_glade.hh:72: error: no type named `Label' in `struct Gtk'
Window1_glade.hh:73: error: no type named `Label' in `struct Gtk'
Window1_glade.hh:74: error: no type named `RadioButton' in `struct Gtk'
Window1_glade.hh:75: error: no type named `RadioButton' in `struct Gtk'
Window1_glade.hh:76: error: no type named `ToggleButton' in `struct Gtk'
Window1_glade.hh:77: error: no type named `Button' in `struct Gtk'
Window1_glade.hh:78: error: no type named `Button' in `struct Gtk'
Window1_glade.hh:79: error: no type named `ToggleButton' in `struct Gtk'
Window1_glade.hh:80: error: no type named `Button' in `struct Gtk'
Window1_glade.hh:81: error: no type named `Fixed' in `struct Gtk'
3kvp.cc: In function `int main(int, char**)':
3kvp.cc:16: error: incomplete type `Gtk' does not have member `Main'
3kvp.cc:16: error: parse error before `(' token
3kvp.cc:19: error: `m' undeclared (first use this function)
3kvp.cc:19: error: (Each undeclared identifier is reported only once for each
function it appears in.)
make[2]: *** [3kvp.o] Error 1
make[2]: Leaving directory `/root/Project/3kvp/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/Project/3kvp'
make: *** [all] Error 2
I installed libraries in /usr/local using make and make install commands. Then I copied .pc files from usr/local/lib/pkgconfig to /usr/lib/pkgconfig
Is this the problem? What I have to do to correct this error?
OK! I'm trying to do that and I will eliminate the copy of .pc files that I putted in /usr/lib/pkgconfig.
But what I don't understand is why I don't have /usr/local in my library path.
It seems that libraries are correctly installed in /usr/local (default option), but each library search other ones in /usr only and not also in /usr/local.
I've uninstalled libraries and I've reconfigured them using ./configure with --prefix=/usr option.
Then I've recompiled and reinstalled them.
Everything was OK about libsigc++, glibmm and gtkmm, but during the reconfiguration process of the glademm library, I had this warning message:
...
checking installed gtk1 version (not needed)... 1.2.10
checking installed gtk2 version... 2.6.1
checking installed gtk-- version (not needed)... ./configure: line 20135: gtkmm-config: command not found
configure: WARNING: Can't determine your gtkmm version, assuming
1.0.0
checking installed gtkmm-2 version (not needed)... 2.4.8
checking for gnome-- 1.x version (not needed)... ./configure: line 20290: gnome-config: command not found
gnome-config not found
Package libgnomemm-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libgnomemm-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libgnomemm-2.0' found
Package libgnomeuimm-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libgnomeuimm-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libgnomeuimm-2.0' found
Package libbonobomm-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libbonobomm-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libbonobomm-2.0' found
Package libbonobouimm-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libbonobouimm-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libbonobouimm-2.0' found
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/writers/Makefile
config.status: creating tests/Makefile
config.status: creating docs/Makefile
config.status: creating docs/old/Makefile
config.status: creating src/SourceWriter/Makefile
config.status: creating glademm.spec
config.status: creating config.h
config.status: executing depfiles commands
I know that I don't have installed libgnomemm and libbonobomm libraries (if necessary I will do it), but I dont know if this warning message is important or not using glademm.
Can I compile and install the library without problems?
Thank's leonscape, I solved my problem.
I compiled the library glademm without considering the warning, then I compiled my software.
I also found that the automatic generation of the makefile doesn't add the command 'pkg-config gtkmm-2.0 --cflags -- libs'.
Adding this to the g++ command the compiler work fine.
I would like to modify the automatic generation of the makefile but I don't know where and what I have to modify.
Any suggestion for me?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.