Re: [Qt-creator] Dependencies in Qt Creator
Kai, Thank you. This sounds like exactly what I was looking for. John On Dec 16, 2009, at 10:43 PM, kai.koe...@nokia.com wrote: qt-creator-boun...@trolltech.com wrote: I have a .pro file that looks like this: TEMPLATE = subdirs CONFIG += ordered SUBDIRS = Project1 \ Project2 \ Project3 Some of the .h files in Project1 are used in Project2 and Project3. When I change one of those header files and do a build, only the files in Project1 get rebuilt. You should set DEPENDPATH in Project2.pro Project2.pro To e.g. ../Project1 (that is, if the header files are directly under Project1. http://doc.trolltech.com/4.6/qmake-variable-reference.html#dependpath Regards Kai -- Kai K?hne Software Engineer Nokia, Qt Development Frameworks Nokia gate5 GmbH Firmensitz: Invalidenstr. 117, 10115 Berlin, Germany Registergericht: Amtsgericht Charlottenburg, Berlin: HRB 106443B Umsatzsteueridentifikationsnummer: DE 812 845 193 Gesch?ftsf?hrer: Dr. Michael Halbherr, Karim T?htivuori ___ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator ___ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator
Re: [Qt-creator] Dependencies in Qt Creator
can we buil a single exec with the qt creator please mention , so that application i can use without installation of Qt everywhere and give to someone to use as a general executable. please help how to build it with Qt creator in projects menu options __ DSP Group, Inc. automatically scans all emails and attachments using MessageLabs Email Security System. Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator
Re: [Qt-creator] Dependencies in Qt Creator
Please do not use the Reply button to ask a new question to a mailing list; it looks like an off-topic question in an existing thread. Please send a new message to qt-crea...@trolltech.com. Meanwhile, to respond to your question... It's possible, but it has some limitations. First, you must rebuild Qt as a set of static libraries. (That is, add the -static flag to configure.) Then you have to add this new Qt installation to Creator. Finally, rebuild your application. There are several disadvantages to static compilation: * You can't do both static and 64-bit on Mac until 4.6.0. (Of course, on Mac there's better solutions than static anyway.) * Qt's plugin system is disabled, which can cause problems for things like SQL drivers and Phonon. * If you're distributing a closed-source application using LGPL Qt, static compilation introduces a major headache; the LGPL requires that the recipient of the program has to be able to relink the program with a modified version of the library. If you're not using plugins (including the plugins included with Qt), and you're only worried about the single executable file on Windows, and you're distributing an open-source application (or if you own a commercial license), you're in the clear. If you need anything different, static linking is probably not a good idea. /s/ Adam On Thu, Dec 17, 2009 at 7:02 AM, Gaurav Purohit gaurav.puro...@dspg.com wrote: can we buil a single exec with the qt creator please mention , so that application i can use without installation of Qt everywhere and give to someone to use as a general executable. please help how to build it with Qt creator in projects menu options __ DSP Group, Inc. automatically scans all emails and attachments using MessageLabs Email Security System. _ ___ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator ___ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator
Re: [Qt-creator] Dependencies in Qt Creator
Well, usually when you're dealing with projects like this putting a dependency on the target file is generally sufficient, since that target file (in its own project file) has a dependency on the header files. (This is, by the way, the canonical workaround for dealing with dependency tracking on static libraries.) I'm not sure, however, that make will detect that the .o files are out of date when that's simply a linker dependency. Try it, see how it goes. /s/ Adam On Wed, Dec 16, 2009 at 8:31 PM, John Vilburn j...@ohanasoftware.com wrote: Adam, Thank you for the response. The problem I see with that approach is that whenever I add or remove a new header in one project I have to remember to modify PRE_TARGETDEP in the other project. I guess I could put the headers in a .pro.inc file and include that in both .pro files. But again, shouldn't there be a better way? Thanks, John On Dec 16, 2009, at 4:20 PM, Coda Highland wrote: You can use PRE_TARGETDEPS in the subdirs' .pro files to watch for individual files to be modified. /s/ Adam On Wed, Dec 16, 2009 at 7:21 PM, John Vilburn j...@ohanasoftware.com wrote: I have a .pro file that looks like this: TEMPLATE = subdirs CONFIG += ordered SUBDIRS = Project1 \ Project2 \ Project3 Some of the .h files in Project1 are used in Project2 and Project3. When I change one of those header files and do a build, only the files in Project1 get rebuilt. Is there a way to have qmake or Qt Creator notice those dependencies and rebuild the appropriate files in Project 2 and 3? Including the .h files from Project1 in the list of headers of Project2 and 3 would work, I suppose. But there must be a better way. Thanks, John ___ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator ___ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator ___ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator ___ Qt-creator mailing list Qt-creator@trolltech.com http://lists.trolltech.com/mailman/listinfo/qt-creator