Linux programmers: Help!

Ok, the semi-relevant background information:
I have a project I’m working on, primarily to learn to be a somewhat competent programmer. The point of this project is for me to learn how to write a program with a GUI, and the toolkit I’ve chosen to use is GTK+ with the GTK-- (GTKmm) wrapper for C++.

Now I’m going through the documentation and introduction to gtkmm at I put in the basic, basic sample program, and everything compiled fine. But when I try to run it, I get this error:

Now I know the file is there, because I spent a couple hours last night compiling and installing packages to be sure gtkmm-2.0 is installed properly, and a quick ‘find’ reveals that is located in /usr/local/lib/, exactly where you might expect it to be.

Now I’m pretty strong at configuring unix, networking, installing systems and packages, troubleshooting, and shell and very basic c/c++ programming, etc, so I’m not a complete newbie, and can understand a technical answer. But I’m in the dark with this whole aspect of it.

How do I tell my system that the file is present, where to find it, and that it should be used?

As a side question, how would I link the libraries in statically (just a curiosity, since I do want to use dynamic linking)?

well first of tell your computer by going to regedit and changing the name of one the programs files or for a more better resul create a new file and call it (program name) syntax code for entering and using. WALLAH!

I have no idea what you just said. Sounds like marketing advice from Mousebat, Follicle, Goosecreature, Ampersand, Spong, Wapcaplet, Looseliver, Vendetta, and Prang.

The NOW program!

Hmm… what happens if you set the LD_LIBRARY_PATH environment variable to /usr/local/lib?

Linux doesn’t have a registry or anything like a registry. Your comments may be appropriate in a MS-Windows environment, but not in Linux.

BTW, the word is `viola’.

What happens? Why, the program works. Thanks much. I knew it’d be something simple like that.

By any chance, do you know what the default path is? Is it just /usr/lib or is there more to it?

Try adding /usr/local/lib to /etc/ and re-running ldconfig. That should add the new libraries to your linker permanently.

It is actually ‘voila’ :stuck_out_tongue: .

Oh, and just to actually add to the topic, you should also make sure that all library files, and the directories you store them in, have appropriate permissions - it’s not enough for the permissions on your executable to be correct. Just a note for the future; doesn’t sound like you need it now.