Qt 4.7.0 Building Problem on Mac OS Snow Leopard
Hey Guys i am new to Qt and trying to learn it and so i have installed the sdk 4.7.0 successfully but i just gave a shot to try a simple Hello World from the Book “GUI programming with C++” but it cant build the program it gives me this message:
ld:: warning: directory ’/tmp/qt-stuff-6474/source/qt-everywhere-opensource-src-4.7.0/lib’ following -L not found
I tried to set the PATH even re-installed but alas failed still have the same problem…
Please Help me Folks…
By the way i forgot to tell about my OS. I use Mac os x Snow Leopard and besides the examples are running but if i check the compiling messages still there is the same message :(
Does /tmp/qt-stuff-6474/source/qt-everywhere-opensource-src-4.7.0/lib exist? Is this where your Qt libraries are located?
nope it does not exist it is not over there
So where does it get that path from? What does qmake -query report? Do the pathes mentioned there match up with your installation?
If they do, please check the .pro file you are building for that path.
I did check with qmake -query everything seems to be installed in its place as it was noted during the installlation process... The whole sdk is in /Developers folder
here is what i get:
As u see the Qt path is not under /usr/local/Trolltech/Qt4.7/bin but /usr/local/Qt4.7 but when i check the $PATH it did not show the path included
but i set the PATH even to /usr/local/Qt4.7 but still the same problem
katrinaniolet last edited by
Yep I'm running into the same problem and don't see any obvious reason why.
Setting the PATH should have no effect on picking up libraries on a unix-based systems like Mac OSX.
So where does it get /tmp/qt-stuff-6474/source/qt-everywhere-opensource-src-4.7.0 from? Is that where you had some sources at some point? Is it where your project is located? Is there anything in your .pro-file that references this location (using an absolute or relative path)?
katrinaniolet last edited by
Nope. Brand new machine nothing on it but the latest xcode, qt sdk, and a small project in ~/projectname, using a simple .pro file
my best guess is this is some temp dir used by Qt Creator during the build process. It doesn't actually cause any problems per se, everything builds fine; its just that it gives those warnings.
legume55 last edited by
I have the same problem. New machine, new installation, same message.
ASGR last edited by
If you're building your project from the command line then you
need to set the environmental variables in either the global profile
file (located in /etc/profile) or the user .profile file (located in the users
home directory that is usually hidden, type 'ls -la' to show hidden files).
The PATH environmental variable only tells the terminal where to
find other binary executables and should include the path to the
To find the libraries, I use the gcc environmental variable
LIBRARY_PATH set to all the locations where I've installed
libraries but I've also seen used LD_LIBRARY_PATH and
DYLD_LIBRARY_PATH to find libraries.
Hope this has helped.
flach last edited by
Same problem. I compile a new project with QtCreator 2.0.1 / Qt 4.7.0 under Snow Leopard. I did not have this warning with QtCreator 2.0.0 / Qt 4.6.2.
I "installed" Qt 4.7 SDK.mpkg bundle on snow 10.6.4 mac/ g++ gcc version 4.2.1.
I can run executables in Qt creator from other libraries, but when I am trying to install a light
viewer built on Qt I get 2 linker warnings by qmake, i.e.
ld: warning: directory '/tmp/qt-stuff-6474/source/qt-everywhere-opensource-src-4.7.0/lib' following -L not found
ld: warning: directory '/tmp/qt-stuff-6474/source/qt-everywhere-opensource-src-4.7.0/lib' following -F not found
With qmake -query everything seems to be right, but qt installation seems broken.
qmake is there, but the lin dir in
has been removed.
This seems like a bug to me (installing a lib in /tmp -> in a directory that is cleaned every time I reboot the machine??) 'n I have already filed it. Let me know if you have any hints,
ziller last edited by
For workaround please have a look at "QTBUG-13462":http://bugreports.qt.nokia.com/browse/QTBUG-13462
Con was right. I had another Qt installed via MacPorts that I've now uninstalled.
But I left earlier versions of Qt that were installed via MacPorts as a dependency for another ports,
ex. boost, cgal (libs rather complicated to build by source), since I don't want to destroy the dependencies. Do you think that this might cause the linker warnings above? I installed a Qt 4.7 SDK.mpkg bundle again, I executed the scripts at the bottom of http://bugreports.qt.nokia.com/browse/QTBUG-13462 , but I get the same warnings..
... Since I can create the applications I want, I do not worry anymore about the ld warnings.
Anyhow, please drop a notification if you fix this.
İsmail Dönmez added a comment - 28/Nov/10 11:58 AM
@N you should update to Qt 4.7.1 which fixes this issue along with others.
mzimmers last edited by
I am running 4.7.1, and I still have this problem. Any suggestions?
Running on a Mac.
iraytrace last edited by
This looks like a bug in qmake. It is used to build the Makefile for the project (you can find the -L option in the Makefile produced).
Looking at the qmake binary with:
% strings /usr/bin/qmake | grep qt-everywhere
produces lots of strings that begin with:
If you want you could hand-edit the Makefile to remove this option from the link command. Alternatively:
% sudo mkdir -p /tmp/qt-stuff-6474/source/qt-everywhere-opensource-src-4.7.0/lib
will create the directory and silence the warning.