在macOS上编译gpsim会导致“错误:'long long type-name'无效" [英] compiling gpsim on macOS causes "error: 'long long type-name' is invalid"

查看:97
本文介绍了在macOS上编译gpsim会导致“错误:'long long type-name'无效"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题之后,我正在尝试编译

Following this question, I'm trying to compile this code on macOS. I ran

/System/Volumes/Data/usr/local/Cellar/qt/5.14.1/bin/qmake

build_XX 文件夹中成功,然后 make .但是,出现编译错误:

inside the build_XX folder successfully, and then make. However, I get the compiling error:


../src/gpsim/protocol.cc:79:8: error: 'long long type-name' is invalid
  uint long long i = ascii2uint64(buffer, digits);
       ^
1 error generated.
make: *** [build/release/protocol.o] Error 1

根据建议此处,我添加了

#ifdef __APPLE__
#include <sys/types.h>
#endif // __APPLE__

protocol.cc 文件顶部的

无济于事.如果您能帮助我理解问题所在以及如何解决,我将不胜感激.感谢您的提前支持.

at the top of the protocol.cc file with no avail. I would appreciate it if you could help me understand what is the problem and how I can solve it. Thanks for your support in advance.

推荐答案

没有 uint long long 这样的类型.

long long unsigned long long .

Qt还提供了 qlonglong .

这篇关于在macOS上编译gpsim会导致“错误:'long long type-name'无效"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆