如何使用Homebrew构建带有调试符号的库?

3

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
1个回答

1

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会更新符号链接。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接