Qt with Eclipse CDT Juno - c++

I am having a difficult time trying to find a way to link the Qt library to my Eclipse project.
The Qt SDK package 4.8.1
with
Eclipse CDT Juno
Is there a way to link Qt libraries to eclipse?

UPDATE: It appears that the Eclipse plugin is no longer officially supported but that it's still available via download. The link below references their ftp site.
Nokia provides Eclipse-Qt integration. That said, it's unnecessary as it's always possible to use an Eclipse project that's using custom build commands. You could simply create a makefile project making certain to run qmake at the appropriate times.
To start, it might be as simple as:
Create a file or two
qmake -project # create your project file
qmake # generate your makefile
# tell eclipse to build the project
If the above, you'd only need to re-run qmake when adding new files and doing other things that affect the qt project file.

#enobayram
Yes it does.
The Qt integration pack is 32bit and therefore all depencies like Eclipse / Java / Qt must be also 32bit.

Related

How to install wxwidgets on Eclipse Mars.2 Mac?

I want to start doing some c++ but need it to be cross platform. I have found wxWidgets as a GUI solution and will use some of their SQL solutions for my program.
I tried searching the internet for how to install wxwidgets on Eclipse Mac but no luck. Haven't found anything that I can wrap my head around it.
wxWidgets is a C++ cross-platform and cross-compiler solution. It means that you don't need to install it. You can just compile it and use it to develop a software.
In order to compile this library, you should have a C/C++ compiler (clang or gcc on OSX/Mac) and their toolchain. Also if you plan to develop for OSX, you shuold have an OSX/Cocoa SDK installed (it is installed automatically with Xcode, have no idea about Eclipse).
In order to do so, you should:
Install C/C++ compiler (either with Xcode or Eclipse or any other IDE you have available).
Download latest wxWidgets release and unpack to you home diectory.
Open up a Terminal and issue following commands:
a. cd ~/wxWidgets
b. mkdir buildMac
c. cd buildMac
d. ../configure --enable-debug --with-cocoa --with-mac-osx-version-min=10.7 && make
e. ./wx-config --cxxflags
f. ./wx-config --libs
Open up Eclipse and start a new C++ project. If you are on OSX you may choose C++ bundle application.
Open the project properties and copy the results of the commands 3e and 3f to the project properties where appropriate. Consult with Eclipse manual/ML/forum to understand where to put that info.
Copy the file ~/wxWidgets/samples/minimal/minimal.cpp to you project directory and add this file to you project. Compile and run the project.
If you get stuck with any of the above instructions or get an error during compilation of either library or your project - don't hesitate to ask either here or open another thread.
Also, you can register on the wxWidgets forum at forums.wxWidets.org and subscribe to the wx-users ML.
Good luck.

How do I set up OpenCV for MinGW project?

I regularly use Code::Blocks and MinGW for my C/C++ projects. I would like to be able to use OpenCV, since it has a nice library for computer vision projects. They have dropped support for MinGW. I have heard you can build it on your own somehow, but I have no experience doing this with 3rd party libraries. Can someone explain how to build it in a simple way for MinGW?
There is, or at least there was at least until 2.4.6, precompiled version of opencv that works out of the box with mingw as long as you use the dw2(standard) version of mingw.
since i needed sjlj support i had to build my own version of openCV 2.4.6
I did he following - i am pretty sure it will work for the current openCV version as well
Setup your preferred Mingw Environment - i would strongly recommend to use gcc 4.5 or newer
Intstall Msys
Intall Cmake - you can get a binary package
Start the Cmake GUI
Select the openCV source folder
Click Configure and select MSYS-Makfiles
Errors in the first run of Configure might be resolved if you run Configure again
Click Generate
use MSYS make to run the generated makefile
Copy all desired libraries and include files to your mingw-installation or your project

Unable to build for Windows on Linux, with MinGW

Because I am not a Java enthusiast, I decided to use C++ and Qt for one of my projects. However, I came across the big cross-compiling Qt problem, and I am unable to produce an .exe file for Windows users.
My setup
Linux Ubuntu 12.04, with Wine and Qt. qmake -v gives the following output :
QMake version 2.01a
Using Qt version 4.8.1 in /usr/lib/x86_64-linux-gnu
I also have a MinGW32 compiler, which can be found at /usr/bin/i586-mingw32msvc-g++. My Wine drive_c folder contains the following Qt directories :
$HOME/.wine/drive_c/Qt/Qt5.2.0/5.2.0/Src
$HOME/.wine/drive_c/Qt/Qt5.2.0/5.2.0/mingw48_32
The mingw48_32 directory contains the necessary include/ and lib/ directories, which are used in my mkspec file, /usr/share/qt4/mkspecs/win32-x-g++/qmake.conf :
QMAKE_INCDIR_QT = /home/me/.wine/drive_c/Qt/Qt5.2.0/5.2.0/mingw48_32/include
QMAKE_LIBDIR_QT = /home/me/.wine/drive_c/Qt/Qt5.2.0/5.2.0/mingw48_32/lib
The problem
According to most guides I've found about Qt cross-compiling, my setup should be enough to run a simple :
qmake -spec win32-x-g++
make
wine /path/to/my/application.exe
But... nothing's linked. QApplication and every other symbol I use in my program are "not found". No QApplication, no QPushButton, no connect(), no SIGNAL(), no SLOT()...
My objective here is to successfully configure QtCreator to use this setup (in an independent build configuration), so that it can build a Linux executable (through the first and working configuration), and a Win32 .exe (through the MinGW setup above). However, I cannot modify a single build step in QtCreator :
Cannot add a "MinGW" toolchain : it is not available in the "Add" dropdown list.
Cannot change the -spec parameter value in the project build configurations panel. The field is non-editable.
Despite guides and solutions I found all over the Internet, my only solution so far is to send my source code to a virtual Windows machine, and have it create a new project with it. On this VM, I could probably compile for Windows... But of course, this doesn't actually sound like a real "solution" to me...
Is there any way Qt(Creator) has finally made cross-compiling easier now ? I'm getting a bit tired of "symbol not found" errors...
First,
sudo apt-get install mingw-w64
Then, check if Qt Creator finds the toolchain.
Next, until Ubuntu starts providing a mingw-w64-qt package, download the Qt source and build it. This is bound to get messy, and maybe even the simplest thing to do is to install WINE and use a Windows Qt version.

Deploy Qt+Boost application on a Mac and Windows

How to deploy Qt+Boost Application on Mac OS X or Windows platform.
I use Qt Creator + Qt 4.6 + MacOS 10.6
How to compile my application into release to run it on another computer w/o installed Qt libraries?
I ship Windows apps built with Qt and I use the Dependency Walker tool to first determine which Qt and MinGW DLLs are required. For Qt 4.6 apps you'll need to always ship the mingwm10.dll and libgcc_s_dw2-1.dll files found in your Qt bin folder (default location of this will be C:\Qt\2009.05\qt\bin).
Depending on which Qt modules you use will determine which Qt DLLs are shipped - you'll always need to ship QtCore4.dll. If you use networking then you'll need QtNetwork4.dll and so on - Dependency Walker will show you.
Note that you should only ship Qt files found in C:\Qt\2009.05\qt\bin and NOT those in C:\Qt\2009.05\bin - the latter folder contains MSVC built Qt DLLs used by Qt Creator and other tools and, assuming you're building using MinGW, these will not work with your app.)
I install these files in the application folder, which isn't ideal if you have multiple products that use Qt. If you are using the same version of Qt for all your projects then you could install the Qt files into a special folder that is then added to the user's PATH. YMMV and this is a big topic in itself.
For Qt, refer to the docs on deployment (Windows, Mac). Keep in mind that Qt is quite big - if you decide to link statically consider building a version of Qt that only contains the modules you need.
Most boost libraries are header only and thus need no deployment. For those that are not (thread, ...) refer to the respective documentation on building and deploy them like any other library.

How do i create a GNU Autotool Project in Eclipse CDT from existing C++ source code?

I have an existing C++ source code that is built using autotools and i wish to use in Eclipse CDT. I'm a beginner with Eclipse CDT. I've installed the Autotools plugin for eclipse but don't know how to create a project from existing code.
May you please guide me in the right direction so that i can create an eclipse project that uses autotools to build this source code?
Thanks
Try to generate all makefiles and then try to import project to eclipse. I think when all Makefiles will exist, then would be no need to install any external plugin for autotools in eclipse IDE. It should work as it is.