Menu

#67 Building debug version fails

v1.0_(example)
open
nobody
None
5
2017-03-04
2017-02-28
No

When building in debug mode I get the following error:

/Applications/Xcode-7.3.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode-7.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -mmacosx-version-min=10.9 -Wl,-rpath,/Users/jschewe/Qt5.4.1/5.4/clang_64/lib -o qztest .obj/qztest.o .obj/testjlcompress.o .obj/testquachecksum32.o .obj/testquagzipfile.o .obj/testquaziodevice.o .obj/testquazip.o .obj/testquazipdir.o .obj/testquazipfile.o .obj/testquazipnewinfo.o .obj/testquazipfileinfo.o .obj/moc_testjlcompress.o .obj/moc_testquachecksum32.o .obj/moc_testquagzipfile.o .obj/moc_testquaziodevice.o .obj/moc_testquazipdir.o .obj/moc_testquazipfile.o .obj/moc_testquazip.o .obj/moc_testquazipnewinfo.o .obj/moc_testquazipfileinfo.o -L/Users/jschewe/projects/grex/working-dir/bps/extlib/install/debug/bin -L/Users/jschewe/projects/grex/working-dir/bps/extlib/install/debug/lib -F/Users/jschewe/Qt5.4.1/5.4/clang_64/lib -lz -L/Users/jschewe/projects/grex/working-dir/bps/extlib/source/quazip-0.7.3/qztest/../quazip/debug/ -lquazip_debug -framework QtNetwork -framework QtCore -framework DiskArbitration -framework IOKit -framework QtTest -framework Security -framework ApplicationServices
ld: library not found for -lquazip_debug
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I looked for the library files and they're in .../qztest/../quazip, not in .../qztest/../quazip/debug.

Discussion

  • Sergey A. Tachenov

    Try r286. I fixed that path, but I have no access to Mac systems, so I have no idea whether that works or not or whether some additional checks are needed to test for specific Mac build environments. And you can always specify the path in the command line when running qmake too.

     
  • Jon Schewe (BBN)

    How would one specify the path on the command line? I see that it's hard coded into your pro file without variables allowing it to change.

     
  • Sergey A. Tachenov

    You can't change it, of course, but you can easily add another path with something along the lines of
    qmake LIBS+=-L.../qztest/../quazip
    That's how I usually specify paths for external dependencies, like zlib.