ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
Originally posted by andox hi im getting the same problems when i try to compile too.. im also new at linux and im not sure of what to do.. even after i read the above im still a lil ocnfused.. where do i get these packages?
You are confusing us too, be specific. Where is your code, and what did you type in the command line.
Qt is a C++ widget toolkit, in other words it's a GUI library. You might not have it installed. The other popular C widget toolkit is called Gtk+ and Gtkmm is the Standard C++ bindings. Again, you might not have this installed either. They would both require special commands. Typically these toolkits use a command line utility called pkg-config. This utility takes care of finding the widget set libraries, and the linking process.
If I were compiling my Gtkmm application I would do it like this:
Code:
#include<gtkmm.h>
int main( int argc, char *argv[] ) {
Gtk::Main kit(argc,argv);
Gtk::Window window;
Gtk::Main::run(window);
return 0;
}
This part of the command " `pkg-config gtkmm-2.0 --cflags --libs` " is the package config utility, the rest of the command is normal g++ (or you could use gcc like demonstrated earlier).
Gtk+ would be compiled simularly however the package would be gtk+-2.0 rather than gtkmm-2.0.
I'm not sure about Qt because I perfer Gtkmm since modern C++ can be used with Gtkmm and not Qt. I can only help if you want to install Gtkmm, but you need Gtk+2.0 installed first. It is probably there already.
Hmmm, I asked you this in the first reply to this thread, and you said the package was installed. Yes, this could be your problem. While it's instructive for all of us to think through useful answers, please be careful and specific when helping to troubleshoot your own system. We all could have saved a lot of time.
Also, when I was trying to install libstdc++-devel-3.3-5.i386.rpm, it says there is a dependency with the package 'libstdc++-devel', how Can I deal with this?
I am really sorry for my stupid.
Actually, when I saw the message about the checking of the package, I am in my office. Thus, I can't check at that time. Also, last night, I have just check the package 'compat-libstdc++-devel', it really exists.
However, when I trying to install the 'libstdc++3.2.2-5'
but it return:
# rpm -pi libstdc++-devel-3.2.2-5.i386.rpm
error: cannot get exclusive lock on /var/lib/rpm/Packages
error: cannot open Packages index using db3 - This operatino is not allowed (1)
error: cannot open Packages database in /var/lib/rpm
Well, 'rpm-qa' seems to say you already have it installed, but perhaps there's something screwed up with it, so yeah, reinstall. Just make sure to use -U (-Uvh), so you update any existing package.
It seems a little messy... I am really sorry for wasting your time. But I would be very appreciate for you kindly patients...
The conclusion is, I haven't got the package 'libstdc++-devel-3.2.2-5.i386.rpm' installed. However, when I use the command 'rpm -Uvh libstdc++-devel-3.2.2-5.i386.rpm' to install this package, it said it can't get the exclusive lock.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.