PDA

View Full Version : Qt and Eclipse problem



PUK_999
20th August 2009, 15:32
Hello,

I want to try Qt with Eclipse and have encountered a problem. Here's what I've done:


Installed Qt 4.5 SDK. So I have C:\Qt\2009.03\...
Installed MinGW to C:\MinGW.
Added C:\MinGW\bin to system PATH.
Installed Eclipse CPP Galileo (3.5) (from eclipse-cpp-galileo-win32.zip).
Installed CDT 6.0.0 (from cdt-master-6.0.0.zip).
Installed Qt Eclipse Integration (from qt-eclipse-integration-win32-1.5.2.exe).
Followed the getting started (http://doc.trolltech.com/qt-eclipse-1.5.0/eclipse-integration-getting-started.html) instructions to create the dummy AddressBook GUI project. I reached paragraph 4 where it mentions that the project can be built.


When choosing the Project->Build Project menu item I get the following message in the Eclipse Console:


Error launching builder (nmake debug )
(Cannot run program "nmake": Launching failed)


Can anyone help?

Thanks,

PUK

PUK_999
20th August 2009, 16:11
If I want to use Qt and Eclipse integration on Windows, must I download/build the Windows source distribution of Qt (i.e. not the SDK)?

I'm getting really confused as to what I'm supposed to do.

StephenR
20th August 2009, 16:40
These are some notes I made about setting up my development environment:

· Download MinGW-5.1.4.exe from http://sourceforge.net/projects/mingw
· Install MinGW by running MinGW-5.1.4.exe and selecting the option to install the “current” package, then select “custom” type of install ensuring the “g++ complier” option is selected and NOT the “MinGW Make” option.
· Update the Path system environment variable to include the bin folder of the MinGW install i.e. C:\MinGW\bin if the default installation directory was chosen in the above step.
· The installation can be verified at this stage by running gcc –v at the command prompt.
· Download gdb-6.6.tar.bz2 from http://downloads.sourceforge.net/mingw/gdb-6.6.tar.bz2
· Extract the above file into the MinGW installation folder. Please note it may be necessary to use a utility such as 7-Zip (http://www.7-zip.org) to extract the file.
Note: When extracting the gdb-6.6.tar file choose the MinGW installation folder as the location to extract the files to so that they are extracted to the correct subfolders. If prompted whether to overwrite any files select “no”.
· Download MSYS-1.0.10.exe from http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe
· Install Minimal SYStem by running MSYS-1.0.10.exe, responding “y” when prompted to continue with the post install and “y” when asking if MinGW is installed.
· Update the Path system environment variable to include the bin folder of the Minimal SYStem install i.e. C:\msys\1.0\bin if the default installation directory was chosen in the above step.
· Download the Eclipse IDE for C/C++ Developers from http://www.eclipse.org/downloads
· Extract the contents of the download to a suitable location e.g. C:\Eclipse
· Ensure the latest version of the Java runtime (available from http://www.java.com) is installed.
· Download the LGPL version of the Qt SDK from http://www.qtsoftware.com/downloads
· Run the file downloaded in the previous step to install the Qt SDK, selecting the default options.
· Download the Qt Eclipse plug-in from http://www.qtsoftware.com/developer/eclipse-integration
· Run the installer downloaded in the previous step to install the plug-in, ensuring the correct installation folders are specified for Eclipse and MinGW when prompted.
· Start Eclipse and select the “Window | Preferences” option from the menu. Select the “Qt” option then click the “Add” button. Enter a suitable name for the version of Qt installed (e.g. Qt 2009.03) and set the bin and include folders for the Qt installation e.g. C:\Qt\2009.03\qt\bin and C:\Qt\2009.03\qt\include.

Hope this is helpful.

PUK_999
20th August 2009, 17:21
Stephen,

Thanks for the reply. Blimey, it's not trivial is it? Looks like you can just use the SDK and don't have to download/build the source then.

PUK

PUK_999
20th August 2009, 19:57
These are some notes I made about setting up my development environment:
<snip>
· Download the LGPL version of the Qt SDK from http://www.qtsoftware.com/downloads
· Run the file downloaded in the previous step to install the Qt SDK, selecting the default options.
<snip>

Should I select to install MinGW when installing Qt? You instruction implies I should but a previous step has installed it.

Thanks,

PUK

PUK_999
20th August 2009, 20:16
Should I select to install MinGW when installing Qt? You instruction implies I should but a previous step has installed it.

Thanks,

PUK

I continued without installing MinGW and have got it to work. I needed to add C:\Qt\2009.03\Qt\bin to the system path so that the test program I wrote could find QtCored4.dll, etc.

Thanks again for your help. I hope I get on well with Qt under Eclipse. Have you encountered any problems or has it been fine?

I had a situation earlier (as in when I installed Eclipse from some other instructions, not yours) when I double cliked on a .ui file to enter the Qt Designer Editor and then brought up the "Qt Widget Box" window but it was greyed out/disabled. It's coming up enabled now but didn't inspire me with a great deal of confidence!

Cheers,

PUK

StephenR
27th August 2009, 09:34
Thanks again for your help. I hope I get on well with Qt under Eclipse. Have you encountered any problems or has it been fine?

Pleased to hear you have got it working. I have not encountered too many problems, although developing under Eclipse can be frustrating at times but I think that is because I am used to developing .NET applications in Visual Studio which is a lot easier! We have had a few issues with the debugger not working consistently which is affecting our productivity a little, but hopefully we can sort that out.

PUK_999
27th August 2009, 09:59
Thankfully for me, the problem that forced me away from Qt Creator towards Eclipse has now been resolved so I'm not using Qt w/ Eclipse anymore.

Out of curiosity, why do you use Eclipse IDE rather than Creator?

Thanks,

PUK.

StephenR
27th August 2009, 16:00
Out of curiosity, why do you use Eclipse IDE rather than Creator?

The project I am working on involves creating a number of modules. We originally thought we would just be using Qt for the graphical modules, so I thought it would be a good idea to use the same IDE for Qt and non-Qt development i.e. Eclipse. However, we have ended up using Qt for all our modules because its non-GUI functionality is also quite useful, so perhaps we should have used Qt Creator after all. I had assumed Eclipse would be a more robust and mature IDE, but now I'm not too sure!