[SOLVED] QtCreator on mac problem building own library inside a project
-
Hi,
It's because on windows you are using a shared library and on unix a static one.
You need to add
@PRE_TARGETDEPS += "../bin/release/libNoctiMath.a"@
-
Hello, it works!
Thank you very much for your reply!
-
I'm having a similar problem ---- I have .PRI files that have lines in them of the form
@
INCLUDEPATH *= $$PWD
DEPENDPATH *= $$PWD
HEADERS *= qtypes.h
Conversions.h
DSSettings.hpp
MiscUtils.hpp
SOURCES *= DSSettings.cpp
MiscUtils.cpp
@but the header and source files don't appear in QT Creator 3(and aren't found during compilation). This used to work when I was using QT4 (with whatever version of Creator was appropriate)
I have observed that if I write
@
HEADERS *= $$PWD/qtypes.h ....
@that works fine.
I have checked with message that both INCLUDEPATH and PWD have the right values
[edit: Added missing coding tags @ SGaist]
-
No one, huh?
Sigh -
Doesn't it work when you add $$PWD in front of your files ?
-
Yes --- but I never had to do that with previous versions of Creator.
Isn't that the whole point of INCLUDEPATH?
-
No, with INCLUDEPATH you tell where to look for includes, however it won't show the file in these folders. It's the job of HEADERS and SOURCES
-
Well, whatever it was, it used to work in the old Creator --- I'd have noticed a long time ago if those files weren't showing up, the project in question has been around for 4 years.
I would also add that (building under the current version of Qt Creator), ignoring their not showing up in the project tree, the files don't get found by the compiler either, even with INCLUDEPATH configured.
If INCLUDEPATH is supposed to be able to tell you where to look for stuff, then the system should be able to find them with explicit PWD prefixed as well.
-
INCLUDEPATH is a folder list for your compiler to search for includes
@INCLUDEPATH = /usr/local@
will result in
@gcc -I/usr/local@
It's not there for Qt Creator to show the files inside your project
-
Every one of my subfolder PRI files has the line
INCLUDEPATH *= $$PWD
so presumably that results in -I(value of PWD for that folder) so stuff should still be found.
In any case, I repeat my original issue -- in the old Qt Creator, the project was able to find all the files referenced in each .PRI file, WITHOUT the need to prefix the HEADER and SOURCES entries with $$PWD/
That doesn't work any more. So either it was a "flaw" that it used to work, or it is a bug that it doesn't work now.
Can't have it both ways.