Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse, QT and "C++ project": is it possible?

Need your help:

I want to use Eclipse CDT and QT without creating a "Qt gui project". Is it possible? How to include QT libraries to my C++ project, and how to call qmake/make to compile the program? This Similar question didn't help me(

I want to use 'C++ project' instead of 'QT Gui project' because there is an issue with external libraries indexing in the QT project (this problem)

Thank you a lot! Nikolai.

like image 711
MTuner Avatar asked Oct 15 '11 02:10

MTuner


1 Answers

We've done something similar using Qt with a vendor customized version of Eclipse (Momentics) and CDT. To get it to work, we ended up creating a generic makefile project in Eclipse with our own, hand generated Makefile.

The hand generated Makefile basically contained enough information to invoke QMake on the appropriate .pro file ("qt.pro") and then invoke the resulting Makefile ("qtmake.mk").

all: qtmake.mk
    $(MAKE) -f qtmake.mk

qtmake.mk: qt.pro
    qmake -r -o qtmake.mk qt.pro

clean: qtmake.mk
    $(MAKE) -f qtmake.mk clean

install: qtmake.mk
    $(MAKE) -f qtmake.mk install
like image 192
jwernerny Avatar answered Nov 08 '22 00:11

jwernerny