4

在 Mac 上编译 pgmodeler 时遇到问题。我qmake pgmodeler.pro在二进制文件夹中输入,并收到以下错误:

 /Users/****/Applications/pgmodelerunzip/pgmodeler-0.8.1-beta/pgmodeler.pri:21: defined(function, type): unexpected type [var].
 /Users/****/Applications/pgmodelerunzip/pgmodeler-0.8.1-beta/pgmodeler.pri:24: defined(function, type): unexpected type [var].
 /Users/****/Applications/pgmodelerunzip/pgmodeler-0.8.1-beta/pgmodeler.pri:103: defined(function, type): unexpected type [var].
 /Users/****/Applications/pgmodelerunzip/pgmodeler-0.8.1-beta/pgmodeler.pri:104: defined(function, type): unexpected type [var].
 /Users/****/Applications/pgmodelerunzip/pgmodeler-0.8.1-beta/pgmodeler.pri:105: defined(function, type): unexpected type [var].
 /Users/****/Applications/pgmodelerunzip/pgmodeler-0.8.1-beta/pgmodeler.pri:106: defined(function, type): unexpected type [var].
 /Users/****/Applications/pgmodelerunzip/pgmodeler-0.8.1-beta/pgmodeler.pri:107: defined(function, type): unexpected type [var].
 /Users/****/Applications/pgmodelerunzip/pgmodeler-0.8.1-beta/pgmodeler.pri:108: defined(function, type): unexpected type [var].
 /Users/****/Applications/pgmodelerunzip/pgmodeler-0.8.1-beta/pgmodeler.pri:109: defined(function, type): unexpected type [var].
 /Users/****/Applications/pgmodelerunzip/pgmodeler-0.8.1-beta/pgmodeler.pri:110: defined(function, type): unexpected type [var].
 /Users/****/Applications/pgmodelerunzip/pgmodeler-0.8.1-beta/pgmodeler.pri:111: defined(function, type): unexpected type [var].
 /Users/****/Applications/pgmodelerunzip/pgmodeler-0.8.1-beta/pgmodeler.pri:112: defined(function, type): unexpected type [var].
 /Users/****/Applications/pgmodelerunzip/pgmodeler-0.8.1-beta/pgmodeler.pri:113: defined(function, type): unexpected type [var].
4

2 回答 2

2

你如何编译 pgModeler?此刻,我只能描述我的情况。

我的编译pgModeler之路

我在 Linux Mint 17.1 (x64) 上遇到了几乎相同的问题。我遵循了本教程:http ://www.pgmodeler.com.br/wiki/doku.php?id=installation

首先,我使用 apt 安装了一些必需的软件包: sudo apt-get install libpq-dev libxml2-dev

接下来我从https://github.com/pgmodeler/pgmodeler/tags下载了最新版本的 pgModeler

在 Linux Mint 的仓库中只有 Qt4 版本,所以我必须使用来自官方 Qt 站点的安装程序来安装 Qt5。我刚刚下载了社区版本并按照说明进行操作。接下来,我只需要通过添加到我的 PATH 中来指定新 Qt 库的路径/etc/environment~/.bashrc这也是一个很好的地方)$QT_DIR/Tools/QtCreator/bin$QT_DIR/5.4/gcc_64/bin(在我的情况下,您可以将其更改为类似的)。

我只剩下qmake pgmodeler.pro && make && sudo make install在终端中输入并等待过程结束。

我的英语还有很多不足之处,所以请给我一些更正。

于 2015-06-09T22:27:17.040 回答
2

答案中的教程链接kamarkiewicz现在无处可去,所以我将在这里发布我认为在 Ubuntu 中进行构建所需的完整软件包列表。

sudo apt-get install postgresql-9.3 postgresql-client-9.3 libpq5 libpq-dev clang libxml2-dev qt5-default libqt5svg5-dev

一开始的 PostgreSQL 东西很明显,但我想我还是会提到它。之后:

  • libpq5并且libpq-dev是 PostgreSQL 开发库。
  • clang是 pgModeler 构建过程中使用的编译器。
  • libxml2-devpgModeler 需要。
  • pgModeler 必须使用 QT5 构建,因此安装qt5-default会为您提供 QT5 开发包并将其设置为默认 QT 版本。
    • 在命令行上测试它qmake -v并验证它是否说它正在使用 QT5。
  • QT的SVG模块是必需的;libqt5svg5-dev提供这个。

如果有人碰巧发现我已经安装了其他所需的软件包,请对此答案发表评论,我很乐意对其进行编辑。

于 2017-03-15T13:03:42.467 回答