问题
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