Can I also do it like this: INCLUDEPATH += .
so it will start searching in the current folder, before going to the publics fulder? Kind regards Robert Schimkowitsch -----Original Message----- From: André Pönitz [mailto:[email protected]] Sent: Wednesday, July 06, 2011 9:33 AM To: [email protected] Cc: Schimkowitsch Robert Subject: Re: [Qt-creator] Follow Symbol...: How to prefer own projectsource file to include path? On Wednesday 06 July 2011 09:15:32 ext Schimkowitsch Robert wrote: > Suppose I have a file "publicheader.h", which is part of a project I am > currently editing. > > In the ".pro" file, I have > HEADERS += publicheader.h > > I also have a COPY of myheader.h in a publics path, so other projects can > easily include it. > Because I also use public files in my own project, my ".pro"-file also > contains the line > INCLUDEPATH += ../../publics > > The compiler now can take its pick: Does it follow the > HEADERS += publicheader.h > or the > INCLUDEPATH += ../../publics There is no choice here, the compiler sees the INCLUDEPATH translated into -I.... options. It never sees HEADERS. Creator's C++ code model does the same. > It will result in the same file (an external tool makes sure the publics > folder is updated), so from a compilation standpoint, it should really work > both ways. > > But when I follow a symbol in Creator, I would rather follow > HEADERS += publicheader.h > than > INCLUDEPATH += ../../publics > > because the first is part of my own project, and writeable whereas the second > is a read-only copy I cannot edit. You can use INCLUDEPATH += private_headers INCLUDEPATH += ../../publics so that the compiler (and Creator) sees your private headers first. Andre' ##################################################################################### This message and any attachments are solely for the use of the intended recipients. They may contain privileged and/or confidential information or other information protected from disclosure. If you are not an intended recipient, you are hereby notified that you received this email in error and that any review, dissemination, distribution or copying of this email and any attachment is strictly prohibited. If you have received this email in error, please contact the sender and delete the message and any attachment from your system. Thank You. ANDRITZ HYDRO GmbH Rechtsform/ Legal form: Gesellschaft mit beschränkter Haftung / Corporation Firmensitz/ Registered seat: Wien Firmenbuchgericht/ Court of registry: Handelsgericht Wien Firmenbuchnummer/ Company registration: FN 61833 g DVR: 0605077 UID-Nr.: ATU14756806 ##################################################################################### _______________________________________________ Qt-creator mailing list [email protected] http://lists.qt.nokia.com/mailman/listinfo/qt-creator
