Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 4

Qt-interest Archive, December 2007
defining preprocessor symbols with qt eclipse integration


Message 1 in thread

Dear list,

i want to use qt with an already existing project, therefore I need to
set specific pre-processor symbols which are used in this project.

I am using the qt eclipse integration in eclipse 3.3.1.1  with cdt. I
start a new qt console project and put in the files. Now when I set the
symbols through the dialog: project - properties - c/c++ include paths
and symbols.

But in the make-process these symbols are not defined:

gcc -c -g -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_GUI_LIB
-DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN
-I"d:\Qt\4.3.2\include\QtCore" -I"d:\Qt\4.3.2\include\QtCore"
-I"d:\Qt\4.3.2\include\QtGui" -I"d:\Qt\4.3.2\include\QtGui"
-I"d:\Qt\4.3.2\include" -I"d:\Qt\4.3.2\include\ActiveQt" -I"debug" -I"."
-I"d:\Qt\4.3.2\mkspecs\win32-g++" -o debug\d3_type.o d3_type.c

 

The symbol definitions are stored in the project-file:

<pathentry kind="mac" name="XYZ" path="" value=""/>

<pathentry kind="mac" name="ABC" path="" value=""/>

<pathentry kind="mac" name="EXAMPLE" path="" value=""/>

 

So my question: How do I define symbols in a qt-project in eclipse to
get my project running? What am I doing wrong?

 

Thanks in advance,

michael

 


Message 2 in thread

Hi Michael,

you can't use the standard Eclipse Dialog, because the Makefiles are 
generated by qmake from the .pro file. So you have to open the .pro file 
and add a Variable 
DEFINES and put the demanded symbols in it.

Regards,
Malte


"Schwarz Michael" <m.schwarz@xxxxxxxxxxxxxxxxxx> schrieb am 20.12.2007 
16:57:54:

> Dear list,
> i want to use qt with an already existing project, therefore I need 
> to set specific pre-processor symbols which are used in this project.
> I am using the qt eclipse integration in eclipse 3.3.1.1  with cdt. 
> I start a new qt console project and put in the files. Now when I 
> set the symbols through the dialog: project â properties â c/c++ 
> include paths and symbols.
> But in the make-process these symbols are not defined:
> gcc -c -g -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -
> DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"d:
> \Qt\4.3.2\include\QtCore" -I"d:\Qt\4.3.2\include\QtCore" -I"d:\Qt\4.
> 3.2\include\QtGui" -I"d:\Qt\4.3.2\include\QtGui" -I"d:\Qt\4.3.
> 2\include" -I"d:\Qt\4.3.2\include\ActiveQt" -I"debug" -I"." -I"d:
> \Qt\4.3.2\mkspecs\win32-g++" -o debug\d3_type.o d3_type.c
> 
> The symbol definitions are stored in the project-file:
> <pathentry kind="mac" name="XYZ" path="" value=""/>
> <pathentry kind="mac" name="ABC" path="" value=""/>
> <pathentry kind="mac" name="EXAMPLE" path="" value=""/>
> 
> So my question: How do I define symbols in a qt-project in eclipse 
> to get my project running? What am I doing wrong?
> 
> Thanks in advance,
> michael
>