No qmake in /bin /sbin /usr/bin /usr/sbin
-
Hey
well, the command which qmake looks for qmake in the directories listed in $PATH, so as /usr/local/Trolltech/Qt-4.6.3/bin is not in your $PATH variable, it can't find qmake.
To add this path to your $PATH, do something like this:
@
export PATH=/usr/local/Trolltech/Qt-4.6.3/bin/qmake:$PATH
@in a shell. I said 'something like this' because I don't know if it works in the same way on OS X and probably there is another place to set this variable globally for your system (so XCode would find qmake as well).
-
So I gave that a shot and entered "export PATH=/usr/local/Trolltech/Qt-4.6.3/bin/qmake:$PATH" into Terminal.
Then following that I tried to find qmake again via "which qmake" I then got:
no qmake in /usr/local/Trolltech/Qt-4.6.3/bin/qmake /bin /sbin /usr/bin /usr/sbin
Your assistance is greatly appreciated.
-
Ops, I committed a mistake in my last post. You have to set the path to the directory where the binaries are located, so the correct would be:
@
export PATH=/usr/local/Trolltech/Qt-4.6.3/bin/:$PATH
@Sorry about that. Now it may work correctly.
-
Thank you! Working great now, really appreciate your help!
-
A new error has popped up now while trying to build via Xcode, my app builds fine via command line, the new error is:
@ cd /Developer/Project/ProjectSrc
/Developer/usr/bin/g++-4.0 -o /Developer/Project/ProjectSrc/.obj/Project.build/Release/Project.build/Objects-normal/i386/Project -L/Developer/Project/ProjectSrc/build/Release -L/usr/local/lib -L/usr/local/Trolltech/Qt-4.6.3/lib -L/usr/local/Trolltech/Qt-4.6.3/plugins/imageformats -L/Developer/FMOD\ Programmers\ API/api/lib -L/usr/local/Trolltech/Qt-4.6.3/plugins/imageformats -L/usr/local/Trolltech/Qt-4.6.3/lib -L/System/Library/Frameworks -F/Developer/Project/ProjectSrc/build/Release -filelist /Developer/Project/ProjectSrc/.obj/Project.build/Release/Project.build/Objects-normal/i386/Project.LinkFileList -lTagLib -lfmodex2 -lmp3lame.0 -lqjpeg -lqgif -lqmng -lqsvg -lqtiff -lqico -lQtXml -lQtGui -framework Carbon -framework AppKit -lQtCore -framework ApplicationServices -arch i386 -Wl,-Y,1455 -mmacosx-version-min=10.4 -headerpad_max_install_names -all_load -L/usr/local/lib -L/usr/local/Trolltech/Qt-4.6.3/lib -L/usr/local/Trolltech/Qt-4.6.3/plugins/imageformats -L/Developer/FMOD\ Programmers\ API/api/lib -L/usr/local/Trolltech/Qt-4.6.3/plugins/imageformats -L/usr/local/Trolltech/Qt-4.6.3/lib -lz -lm
/Developer/usr/bin/../libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols:
QSvgRenderer::load(QByteArray const&)
QSvgRenderer::render(QPainter*)
QSvgRenderer::QSvgRenderer(QObject*)
QSvgRenderer::isValid() const
QSvgRenderer::viewBox() const
/usr/local/Trolltech/Qt-4.6.3/plugins/imageformats/libqsvg.a(qsvgiohandler.o) reference to undefined QSvgRenderer::load(QByteArray const&)
/usr/local/Trolltech/Qt-4.6.3/plugins/imageformats/libqsvg.a(qsvgiohandler.o) reference to undefined QSvgRenderer::render(QPainter*)
/usr/local/Trolltech/Qt-4.6.3/plugins/imageformats/libqsvg.a(qsvgiohandler.o) reference to undefined QSvgRenderer::QSvgRenderer(QObject*)
/usr/local/Trolltech/Qt-4.6.3/plugins/imageformats/libqsvg.a(qsvgiohandler.o) reference to undefined QSvgRenderer::isValid() const
/usr/local/Trolltech/Qt-4.6.3/plugins/imageformats/libqsvg.a(qsvgiohandler.o) reference to undefined QSvgRenderer::viewBox() const
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status
collect2: ld returned 1 exit status@Any thoughts on this? Again I appreciate your assistance!
-
Well, it seems you need to set your environment correctly to work with XCode. As I've never used XCode, the only things I can help you are the Mac stuff that the look like Linux stuff. So, try to adjust somewhere the variables LIBRARY_PATH (for the linker) and LD_LIBRARY_PATH (probably needed to run stuff correctly). If I am not wrong (again), you need add /usr/local/Trolltech/Qt-4.6.3/lib/ to both variables (set them in an analog way of what you did for PATH).
And let's see if someone who knows XCode and these OS X things can help too :-)
-
In my .pro file I have:
@QTPLUGIN += qjpeg qgif qmng qsvg qtiff qico@
Which should cover that, right?
-
Not really. The SVG support changed, as far as I remember. There is a Qt SVG module, that you can enable with adding "svg" to the QT variable (not QTPLUGIN). That adds the QtSvg.framework to the libs linked to your program and should solve the linking problem.
-
Thank you, this solved my errors.