homebrew
是否有任何选项来构建带有调试符号的包?我使用 QT 库开发了一个应用程序,并希望从我的 IDE 中快速访问它的源代码。
我的QT安装步骤:
brew install qt
brew link --force qt
QT_V=`brew info --json=v1 qt | jsawk -n 'out(this.installed[0].version)'` \
ln -sf /usr/local/Cellar/qt5/${QT_V}/mkspecs /usr/local/mkspecs && \
ln -sf /usr/local/Cellar/qt5/${QT_V}/plugins /usr/local/plugins
最佳答案
Homebrew 没有这样的通用选项。运行 brew info <formula>
获取给定公式的可用选项。
在qt
的情况下没有 --debug
选项:
$ brew info qt
...
==> Options
--with-docs
Build documentation
--with-examples
Build examples
--with-mysql
Build with mysql support
--with-postgresql
Build with postgresql support
--with-qtwebkit
Build with QtWebkit module
--HEAD
Install HEAD version
旁注:使用 brew --prefix <formula>
获取公式的已安装前缀。如果链接,您将获得一个与版本无关的前缀:
$ brew --prefix qt
/home/baptiste/.linuxbrew/opt/qt
这适用于公式升级,因为 Homebrew 负责更新符号链接(symbolic link)。
关于macos - 如何使用 Homebrew 软件构建带有调试符号的库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45274051/