Closed ZhongRuoyu closed 1 year ago
Sorry for the noise above! I didn't add -std=c++11
initially because I thought this should be the default for recent C++ compilers. But it turned out that the flag is still needed. At least clang++
still didn't like the double right brackets (our build logs can be found here).
As an unintended side effect, another issue was observed: this time, Linux complained about this (build logs):
g++-11 -O3 -std=c++11 -Dunix zpaqfranz.cpp -o zpaqfranz -pthread -lm
zpaqfranz.cpp: In function ‘int64_t getramdisksize()’:
zpaqfranz.cpp:52412:16: error: ‘internal_getramdisksize’ was not declared in this scope
52412 | return internal_getramdisksize(); /// if you get an error HERE substitute with return 0;
| ^~~~~~~~~~~~~~~~~~~~~~~
make: *** [NONWINDOWS/Makefile:18: zpaqfranz] Error 1
This was due to usage of a non-standard macro linux
. In 4cc32b6ffa599e3b9528c4c97d52b6ebcc697efa, I replaced linux
and __linux
with the standard-comforming __linux__
, and the error was fixed. See: https://stackoverflow.com/questions/142508/how-do-i-check-os-with-a-preprocessor-directive.
zpaqfranz.cpp
is a C++ program, so it should be built with a C++ compiler.Also,
-lstdc++
is removed fromLDADD
because this should already be added by the C++ compiler.Fixes #50.