Qt-interest Archive, December 2007
qt+eclipse include path problem
Message 1 in thread
Hi!
I'm new to qt and eclipse and to this mailing list - directions to fix
my problem and maybe to a more suited mailing list are highly appreciated.
Environment: WinXPsp2, mingw-5.1.3, qt-4.3.3-opensource-edition,
eclipse-CDT-3.3.1.1, qt-eclipse-integration-win32-1.0.0.exe
I can successfully build and run the hello world project: (File->new ->
qt GUI project -> name:HelloWorld).
The problem arises when I want to add external include files. I did:
1. add to helloworld.cpp: #include <mylib/include.h>
2. add the include path:
right-click on the HelloWorld project -> Properties -->
c/c++ Include Paths and Symbols --> Add External Include Path -->
c:\path\to\my\includes --> OK
Now, if I point the cursor at mylib/include.h and press F3 eclipse will
open the include file. This means that eclipse is using the added
include path and find the include file.
But when building the project, g++ complains "No such file or directory".
Taking a look at the console during compilation I see that g++ is called
without specifying the additional include path (-I...).
When I add the include path manually to Makefile.Release it works as
long as the Makefile is not re-generated.
Now my questions: Shouldn't the include path in the eclipse project also
automatically added to the makefiles? If not, how can I specify the
include path for the makefile?
thanks
Klaus
--
[ signature omitted ]
Message 2 in thread
On 11.12.07 19:39:28, Klaus Darilion wrote:
> Now my questions: Shouldn't the include path in the eclipse project also
> automatically added to the makefiles? If not, how can I specify the include
> path for the makefile?
Add INCLUDEPATH = yourpath to the .pro file. I don't know wether the
eclipse integration has any way of doing this, though.
Andreas
--
[ signature omitted ]
Message 3 in thread
Andreas Pakulat wrote:
> On 11.12.07 19:39:28, Klaus Darilion wrote:
>> Now my questions: Shouldn't the include path in the eclipse project also
>> automatically added to the makefiles? If not, how can I specify the include
>> path for the makefile?
>
> Add INCLUDEPATH = yourpath to the .pro file. I don't know wether the
> eclipse integration has any way of doing this, though.
Hi Andreas!
Thank you - that worked!
Do you know how I add libraries (.a, .lib)?
- Do I also have to add them twice: eclipse project settings and .pro
file?
- what are the variable names in the pro file for the library path and
the library names?
regards
klaus
--
[ signature omitted ]
Message 4 in thread
On 11.12.07 20:56:34, Klaus Darilion wrote:
> Andreas Pakulat wrote:
>> On 11.12.07 19:39:28, Klaus Darilion wrote:
>>> Now my questions: Shouldn't the include path in the eclipse project also
>>> automatically added to the makefiles? If not, how can I specify the
>>> include path for the makefile?
>>
>> Add INCLUDEPATH = yourpath to the .pro file. I don't know wether the
>> eclipse integration has any way of doing this, though.
>
> Do you know how I add libraries (.a, .lib)?
> - Do I also have to add them twice: eclipse project settings and .pro
> file?
As I said, I've got no idea how the eclipse-stuff works.
> - what are the variable names in the pro file for the library path and the
> library names?
Check out the QMake manual: doc.trolltech.com/4.3/qmake-manual.html
Andreas
--
[ signature omitted ]
Message 5 in thread
Andreas Pakulat wrote:
> On 11.12.07 20:56:34, Klaus Darilion wrote:
>> Andreas Pakulat wrote:
>>> On 11.12.07 19:39:28, Klaus Darilion wrote:
>>>> Now my questions: Shouldn't the include path in the eclipse project also
>>>> automatically added to the makefiles? If not, how can I specify the
>>>> include path for the makefile?
>>> Add INCLUDEPATH = yourpath to the .pro file. I don't know wether the
>>> eclipse integration has any way of doing this, though.
>> Do you know how I add libraries (.a, .lib)?
>> - Do I also have to add them twice: eclipse project settings and .pro
>> file?
>
> As I said, I've got no idea how the eclipse-stuff works.
>
>> - what are the variable names in the pro file for the library path and the
>> library names?
>
> Check out the QMake manual: doc.trolltech.com/4.3/qmake-manual.html
ok, thanks
regards
klaus
--
[ signature omitted ]