点击Qt 左侧的projects --buildsteps 点击Addbuldssep 在command arguments中
写入-change /usr/local/lib/TSPasteboard.dylib @executable_path/../MacOS/dylib/TSPasteboard.dylib clipmate.app/Contents/MacOS/clipmate
-change /usr/local/lib/TSPasteboard.dylib 库编译的默认路径
@executable_path/../MacOS/dylib/TSPasteboard.dylib 库的替换路径
LIBS += -L../clipmate/\
-lTSPasteboard
-L 后指定库 的路径
-l 指定加载的库名 不用加后缀
在终端查看库的默认路径
命令行输入:otool -L 将你的动态库拖到终端
得到路径:/Users/macpro/Documents/trproject_mac/build_clipmate/clipmate.app/Contents/MacOS/clipmate
打印信息: /Users/macpro/Documents/trproject_mac/build_clipmate/clipmate.app/Contents/MacOS/clipmate:
/usr/local/lib/TSPasteboard.dylib (compatibility version 1.0.0, current version 1.0.0)
QtSql.framework/Versions/4/QtSql (compatibility version 4.7.0, current version 4.7.0)
QtGui.framework/Versions/4/QtGui (compatibility version 4.7.0, current version 4.7.0)
QtCore.framework/Versions/4/QtCore (compatibility version 4.7.0, current version 4.7.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 830.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)
与信息同步就Ok了