Eclipse c++ gui development
Does anyone know of a way, plugin, or procedure to develop gui/form programs under Eclipse/CDT (c++). There are lots of hits that come up on Google. But so far none of them work with Eclipse and C++. Most of the hits for some reason end up talking about developing Java apps, or just basic installation of Eclipse.
About the closest I found is : http://www.linuxquestions.org/questi...-c-gui-788661/ , right here on LQ. However this one doesn't work beecuase the plug referred in the links has been removed. It doesn't matter whether it's GTK, QT, QTMM, WxWidgets, or any other. I have explored everything I can find, but so far, as I mentioned, none of them works in Eclipse... or you need to do some type of configuration, of which I can't find the steps. Thanks in advance for any suggestions or comments. -- L. James -- L. D. James ljames@apollo3.com www.apollo3.com/~ljames |
you have gui designers, gade for fltk, qtdesigner for qt, fuild for fltk, and possible also something for wxWidgets
you use those to create the gui. and eclipse for development. eclipse has an external tool command which you can configure so that you can add some comfortable way to choose the tool of your choice. this might sound a bit strange if you come from an IDE with integrated gui designer, but it works pretty well. if you look for something that is more focused on gui development, than QT Creator is possible the better choice. |
Quote:
I appear to have everything. But I don't see of a way to interface with the tools in such a way that I can output anything written in c++ to a gui Window, except for creating a gui application in java and calling that application with a system command. I know, as you mentioned, there are tools. I'm sure I have all of them installed. I at least have the list I mentioned in my original post installed. But so far, that's just about as far as I have gotten. I can use the tools such as qtdesigner to make a form. But I don't know how to interface with that form from a c++ program using Eclipse. If you have every done it, I'd appreciate some specific steps that might work, and actually output a, "Hello World" in a gui window. I know that people are actually doing this in Eclipse. But I can't find any actually steps that works. Thanks again for the input! -- L. James -- L. D. James ljames@apollo3.com www.apollo3.com/~ljames |
Quote:
http://www.zetcode.com/gui/qt4/ |
Quote:
When I discover how to create a gui Hello World, I'm going to post it here, something that actually works so that others trying will have a starting point. As I mentioned, the question is asked many times, and responded to many times. But currently I haven't found any example that actually works. Most of the programming I've been doing over the 40 years of my experience has always started out with a "Hello World" example (that actually worked) that the student could at least look at and analyze, and expand upon. Hopefully there might be something similar in the links that you provided. I'll get back to you with them. And again, if I saw a hello world example that actually worked, there really wouldn't be any stopping me. Most of my research (even on LQ) the users have replied with links to explanations and example. However, as I showed above, the links are dead now. It would have been nice if the answers to the questions in the past had included text from the links that would still be alive and productive for new people that are trying to get a grip on it. -- L. James -- L. D. James ljames@apollo3.com www.apollo3.com/~ljames |
Quote:
I reviewed your link. I don't have any problems developing and compiling code using the Qt Toolkit. I believe you missed the gist of my question. My questions is about interfacing Qt with the Eclipse IDE. I appreciate that many are on a mission to tell people not to use IDE's. If that is your advice, I appreciate it. However, I'm trying to learn to use, and interface a GUI form facility into Eclipse. I know it can be done, and I know that people actually do it. If you have an idea how to do it, I'd appreciate it. My Qt is already installed. I have no problem performing the examples with my Qt installation. I'm just hoping that someone who knows how to actually interface this GUI (Qt) or any other framework application with Eclipse, will assist with a solution that works. Even links that address the issue would be good. I probably should have posted a few 10's of links that I've already found that speaks about the interface, but the examples don't work. If you don't care about the Eclipse IDE, you probably feel I'm going the wrong direction. -- L. James -- L. D. James ljames@apollo3.com www.apollo3.com/~ljames |
it's for windows, but you should not have a problem to ignore the windows parts or adopt them for linux.
http://therning.org/magnus/archives/1023 this should help you to get you hello world app from withing eclipse, if not I do not understand that problem you have or missinterprate "interfacing Qt with the Eclipse IDE" |
Quote:
So for the steps that are apparently provided for Linux will not work (in my environment). I have confidence that it can work since there are so many references to compiling forms and gui apps with c++ under the Linux/Eclipse environment. I realize the current linking problem/file not found in my attempts will appear simple and matter of fact type obvious once I get it setup and working. After 12 hours I've reached a minimum number of errors when trying to compile the steps I linked: Code:
gio/gio.h: No such file or directory Code:
#include "/usr/include/glib-2.0/gio/gio.h" I should be placing this description in a "reply/follow-up" to Dugan's post. I had already replied and was throughly investigating his suggestion so that I could ether have it working or be extremely specific on the point where it fails. The "zetcode.com" part of his message has great resources. I use a Google site search with the zetcode site name and (gui, c++, eclipse) as the search parameters and found this current example. So far it was working better than all the others that I have tried. I'll soon report on both this one and the new link you provided. Thanks! -- L. James -- L. D. James ljames@apollo3.com www.apollo3.com/~ljames |
Then I don't understand the question, and I can guarantee you that no-one else does either.
As of now, you've mentioned that: a) you can use Qt Designer to design a form just fine b) you can build Qt apps (I assume with Eclipse) just fine So what's the problem? Use Qt Designer to build the form, and then use Eclipse for the actual C++ programming. If you want Qt Designer to be integrated into Eclipse, then the answer is that that option is not available. Not currently. And if the question is how to load a Qt form in your C++ code, see here: http://qt-project.org/doc/qt-5.0/qtd...a-ui-file.html |
Quote:
While I feel my question is kind of simple. I have bascially a default Ubuntu linux installation out of the box. I have a default Eclipse installation out of the box. I have used the package repositories to install everything that I find in any of the steps that are provided gui development in c++/eclipse, but at present not of the provided steps work. Since it's very obvious that someone has done something to make it work, I'm hoping that someone familiar with the environment will provide the missing link of what needs to be added in a default (virgin) install. A working test of a the simplest "Hello World" in a gui compiled from the Eclipse IDE would be the answer to my question. Again, when I get it figured out I'll post a working example to this thread. I'll try to explain directly what I mean in referencing "interface to a form/gui". I can use the QT Development tools (installed from the distro repository via synaptic). I can develop a form (gui window) using the tools. The tools work. The link you gave me shows how to use the GT tools. However, at present I can't figure out how to communicate with the framework (GUI windows/forms) while in the Eclipse environment. While in Eclipse I can easily output "Hello World" to the console. Out side eclipse I can use the QT tool to create a Hello World gui output. I'm trying to combine the two while working in Eclipse. The link I provided in my previuos message shows how to do it with "GTK". However, as I mentioned in my previuos mesasge, not of the examples provied in the hundreds of pages that I've studied work. My vocabulary and jargons are different from yours. With more communication I'll probably terms you're more familiar with. But I'm trying to explain that I want to be able to have my output in Eclipse actually communicate with a GUI window, where instead of going to the console I can output it to either or both. -- L. James -- L. D. James ljames@apollo3.com www.apollo3.com/~ljames |
there is nothing to communicate with some framework for eclipse.
you need just set up the right include directories and set the propper link directories for the project. your sample with the gio.h shows me that you have not done this. (or did it wrong) Project - Properties - C/C++ General, there you can configure include and link and other properties for your project |
Quote:
You're absolutely right about what I'm trying to communicate as far as things not "properly" linked. If it was properly linked I wouldn't get error, and my Ecllipse gui c++ output would go to frames just as my java ouput can go to frames and windows. In Java I can output to both a gui frame and the console or either. I followed the provided steps to setup the java environment to do it. Most of the steps I found on the internet for setting up java works flawlessly. That is why I was able to set it up properly. This isn't the first time I have tried to setup a gui for c++ in Eclipse "properly". I gave up in the past and am revisiting it. I've been trying to get this done for a couple of days and recently almost 12 hours of work nearly none stop. I followed all the steps in the link I gave you to the letter (as far as I can see) and I'm still having problems. The link said to configure the include and link and other properties for my project, just like you have said. I posted a description in a previous message to the steps I used in following the "proper" link. I did it exactly to the letter as far as I can see. I posted the errors and would post any thing that you think might be relevant to actually getting it to work. I hope you understand that I have the utmost appreciation for your input. But at the same time, I understand that you're telling me to configure it properly. I don't know of any other steps but the steps that are posted on how to configure it. I understand that your reply might be, something is wrong with my configuration. If it were configured properly it would work. Also, I already know that. I can't figure out anything more properly than the many links that I've round of which currently doesn't work. Hopefully someone who actually have it working can give a tip on how they overcame any of the hurtles I'm experiencing from a virgin installing and following the steps to the letter. They probably did something a little extra and got it to working. I'm trying to figure out what, in addition to all the steps that I can find has to be done. I realize and appreciate that the matter is more complex and takes more work that you can probably contribute by actually testing steps and verifying whether they actually work or not. It's very easy to say configure the includes, links, libraries, and installation properly and it'll work. But saying it and actually having it achieved can be worlds apart. It might not be as simple as you think. -- L. James -- L. D. James ljames@apollo3.com www.apollo3.com/~ljames |
setting up a custom include path
https://www.youtube.com/watch?v=QCfDuqwFoR0 if you do this correctly than #include <gio/gio.h> will not bring an error you might also watch some of the other eclipse cdt tutorial videos on youtube https://www.youtube.com/results?sear...utorial&page=1 start with the installation, check if you ide is ok, than a simple hallo world program, console, than add a gui lib , set the include, the required libraries as mentioned in the zetcode.com article. if you have compile/linker error, post the error message with a short description of problem (to make it simpler for non native english speakers:-) |
2 Attachment(s)
Quote:
I understand that I posted a lot and you may not have taken the time to read all the details. But I mentioned that I had setup the include path exactly the way it was in the link I was using. I did for GTK what the video did for mysql. I have been programing with Eclipse for over 4 years. I'm able to import and work with mysql includes and libraries. The problem I'm having is with GTK. I understand that you were showing me how to setup eclipse for the libraries. The link I posted shows also. I browsed around the file system to add the directories. The directories are recognized, otherwise eclipse give a question mark “?” if you post an include that it can't locate. I can also browse in the Eclipse browser and see the header files that are in the include directive lines. I'll try to include every thing that you asked for in this post. (Oh yea. Great video for someone that doesn't know how to navigate the project properties.) Quote:
Eclipse is setup correctly. Also to insure that I was following close with an eclipse setup that might cause conflict I performed a number of fresh eclipse installed that resulted in the same problem. I have no problems with my C++ files and outputing to the console. I also tested some gui examples from the internet, compiled from the bash commadline that works. My problem comes when I try to use the gui while in the Eclipse IDE. Quote:
(Almost exact except for the include directive with the full path to the file from the error message.) Code:
#include <stdio.h> Code:
Description Resource Path Location Type Code:
${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} Code:
g++ Code:
-I/usr/include/gtk-2.0 -I/usr/include/glib-2.0/gio -I/usr/include/gtk-2.0/gtk -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -O0 -g3 -Wall -c -fmessage-length=0 I'll post anything else that you might need to help identify the problem. I'll also run any test that you think might help, including trying a different example. Thanks! -- L. James -- L. D. James ljames@apollo3.com www.apollo3.com/~ljames |
I got past the gio/gio.h no such file error. I linked to it in the includes directory:
Code:
$ sudo ln -s /usr/include/glib-2.0/gio/ /usr/include/gio Code:
Description Resource Path Location Type -- L. D. James ljames@apollo3.com www.apollo3.cm/~ljames |
All times are GMT -5. The time now is 07:40 AM. |