ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
I have gtkmm up and running...somewhat...I guess. I can create an interface in Glade, save the C++ source, edit the source and compile it with the created make files.
What I am trying to do is create the .xml file with Glade, then use it in a c++ application. When I compile on the command line, none of the headers are found/recognized/etc. I get errors saying libgladdmm - no such file, gtk, glib, etc all not found.
They are loaded on the machine and they compile fine with the make file generated by glade, but I dont want to use that....I want my own.
Any ideas on how to remedy this is greatly appreciated.
OK, I went and downloaded libglademm. When I attempted to install it, I get the following message from 'configure':
configure: error: Library requirements (gtkmm-2.4 >= 2.4.0 libglade-2.0 >= 2.3.6) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.
gtkmm and libglade are installed.....how else would glade be able to generate the C++ code and how would the makefile generated by glade work properly?
I just want to get things running so I can generate the UI with glade, then create my own sources with emacs, and use the .glade xml file to instantiate the UI.
Seems like I need to edit some pathways.....but I am not quite sure which ones or how.
Again, any and all assistance is extremely appreciated.
The xml file is just for saving. Glade will use it to generate the source code. There are certain files you can edit, like callbacks.c and main.c (for c code). You can tell which ones you can edit and which ones you can't because you will see soething like this:
This file is automatically generated by Glade. Do not edit.
The files that don't have this can be edited.
To do things, you would edit the properties of a button in Glade and tell it to execute a certain function when the button is clicked. Using C, an empty function would appear in callbacks.c, and the code in that function will be executed whenever the button is clicked (not sure exactly what happens with glademm, but I'm sure it's quite similar).
To compile the stuff yourself manually, you have to use the right options with g++. For example:
g++ -c file.cpp -I /usr/include/gtk -o file.o
The directory is different on many systems, and there is a program called pkg-config to automatically find out which include directories and options to use:
gcc -Wall -g helloworld.c -o helloworld `pkg-config --cflags gtk+-2.0` \
`pkg-config --libs gtk+-2.0`
The above would automatically give all the options needed for using gtk+ 2. You will need to make sure you get all the options fro each library you use (like gktmm for example).
melinda_sayang...the export line in bashrc seems to have done some good...
everything is loaded now. And yes, I do want to use the XML file produced by glade to load the GUI. The only problem now seems to be that libglademm (as an include) is not found.
For example, the example I am following (from libglademm package) says to include the following:
however, the compiler reports that that file or folder does not exist. I have placed a path to it in the ld.so.config file. But seems to not have done any good.
So if I can get it to find the header file, things will be good.
johnMG....I will check out toad. I just want a C++ environment with a widget set that can be used on different platforms (like gtk) without have to spend a great deal (like with QT on Windows).