Closed tansy closed 11 months ago
error: ‘signal’ was not declared in this scope Added signal header include in the unix section.
include
Compiling... where?
In Linux. Updated first post with explanation.
In Linux.
Can you please write the exact distro and version? I'll check and fix tomorrow (only Windows now) Thank you
Slackware 14.x, heavily updated. GCC 4.9, 6.5, Clang 3.8, same result.
Slackware 14.x, heavily updated. GCC 4.9, 6.5, Clang 3.8, same result.
Cannot reproduce on Slackware 15, gcc 11.2.0, clang 13.0.0 I'll try with version 14
only Windows now
https://www.virtualbox.org/ http://www.slackware.com/getslack/
only Windows now
https://www.virtualbox.org/ http://www.slackware.com/getslack/ Slackware64 14.0 VM gcc 5.3.0 clang 3.8.0 g++ -O3 -Dunix zpaqfranz.cpp -o zpaqfranz -pthread -std=c++11 clang++ -O3 -Dunix zpaqfranz.cpp -o zpaqfranz -pthread -std=c++11
Slackware64 15.0 VM gcc 11.2.0 g++ -O3 -Dunix zpaqfranz.cpp -o zpaqfranz -pthread -lstdc++ -lm clang 13.0.0 clang++ -O3 -Dunix zpaqfranz.cpp -o zpaqfranz -pthread
Now on Slackware 12 32 bit , work in progress...
On old compilers the -DANCIENT is mandatory, for example
Slackware 12.0 (32 bit)
gcc 4.1.2
g++ -O3 -DANCIENT -Dunix zpaqfranz.cpp -o zpaqfranz -pthread
This will disable the Control-C handler
What you call ancient? Your Linux esxi (whatever that means) executable is compiled with gcc-3.4.6.
What you call ancient? Your Linux esxi (whatever that means) executable is compiled with gcc-3.4.6.
ESXi is the VMware hypervisor
Ancient is, for example, Power PC-powered Macs, some very old Solaris machines etc
For Linux just about anything earlier of gcc 7.3 (of 2018) is ancient, for me at least.
If zpaqfranz does not compile, try -DANCIENT
Cannot "guess" what your compiler do/don't support
gcc 5.3 is 8 years old, about 40 releases older then the current one
clang 3.8 about 50 releases
To facilitate cross-platform portability, I will not include signal.h
Trying to compile it in Linux got this error:
Error in full:
When looked for error I got this this answer: You haven't included signal.h. . Therefore added
#include <signal.h>
.