compiling gpsim on macOS causes “error: 'long long type-name' is invalid”

给你一囗甜甜゛ 提交于 2021-01-29 16:09:56

问题


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

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

as suggested here, I added

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

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.


回答1:


There's no such type as uint long long.

There is long long and unsigned long long.

Qt also provides qlonglong.



来源:https://stackoverflow.com/questions/61427058/compiling-gpsim-on-macos-causes-error-long-long-type-name-is-invalid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!