linux - 在 Linux 上构建 Mailcore2

标签 linux ubuntu ubuntu-18.04 mailcore2 mailcore

我正在尝试在 linux(Ubuntu 18.04)上构建 mailcore2 库,但遇到了困难。 (大多数情况下)按照他们的 repo 说明:https://github.com/MailCore/mailcore2/blob/master/build-linux/README.md
所以首先我安装依赖项(一切正常):

sudo apt-get install libctemplate-dev libicu-dev libsasl2-dev libtidy-dev \
    uuid-dev libxml2-dev libglib2.0-dev autoconf automake libtool cmake
然后它指示如何构建 libetpan,但我使用的是 libtepan 存储库中的更新说明:https://github.com/dinhviethoa/libetpan :
git clone https://github.com/dinhviethoa/libetpan
cd libetpan
./autogen.sh
make
sudo make install
最后我尝试构建MailCore:
git clone https://github.com/MailCore/mailcore2
cd mailcore2
mkdir build
cd build
cmake ..
make
但无论我使用什么提交,我总是会收到以下错误:
In file included from /home/<USER>/mailcore2/src/core/basetypes/MCString.h:7:0,
                 from /home/<USER>/mailcore2/src/core/basetypes/MCData.cpp:24:
/home/<USER>/mailcore2/build/src/include/MailCore/MCICUTypes.h:16:25: error: conflicting declaration ‘typedef short unsigned int UChar’
 typedef __CHAR16_TYPE__ UChar;
                         ^~~~~
In file included from /usr/include/unicode/utypes.h:38:0,
                 from /usr/include/unicode/ucsdet.h:24,
                 from /home/<USER>/mailcore2/src/core/basetypes/MCData.cpp:15:
/usr/include/unicode/umachine.h:347:22: note: previous declaration as ‘typedef char16_t UChar’
     typedef char16_t UChar;
                      ^~~~~
src/CMakeFiles/MailCore.dir/build.make:182: recipe for target 'src/CMakeFiles/MailCore.dir/core/basetypes/MCData.cpp.o' failed
make[2]: *** [src/CMakeFiles/MailCore.dir/core/basetypes/MCData.cpp.o] Error 1
CMakeFiles/Makefile2:85: recipe for target 'src/CMakeFiles/MailCore.dir/all' failed
make[1]: *** [src/CMakeFiles/MailCore.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
我在 iOS 上使用它(通过 CocoaPods)已经有一段时间了,但想将我的电子邮件功能移动到服务器端。我在 Github 上打开了一个问题,但还没有吸引力。

最佳答案

/home/<USER>/mailcore2/build/src/include/MailCore/MCICUTypes.h代替:

typedef __CHAR16_TYPE__ UChar;
和:
typedef char16_t UChar;
然后运行:
make clean
make

关于linux - 在 Linux 上构建 Mailcore2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62644650/

相关文章:

c++ - Cuda 错误未定义对 'cufftPlan1d' 的引用?

opencv - "Error: ' 尝试使用 OpenCV 和 CUDA 构建暗网时,IplImage' 没有命名类型?

docker - 配置文件更改为VerneMQ docker镜像

c# - ubuntu中的Firefox浏览器检测

python - 当我运行 ' FileNotFoundError: [Errno 2] No such file or directory:' 时,为什么我在终端中收到 `python ./train.py`

docker - 从 ubuntu 18.04 升级到 18.10 后,docker 容器内没有互联网连接

c - 如果在取消点调用信号处理程序会发生什么?

java - 我的java版本是jdk 1.7.但是maven使用jdk 1.6

linux - 如何记录特定文件的具体修改

python - Django:使用 simple-history 模块我得到 auth_historicaluser 不存在错误