We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I got a error when build c4 in macos 10.15
c4.c:333:5: error: first parameter of 'main' (argument count) must be of type 'int' int main(int argc, char **argv)
My gcc version
gcc -v Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1 Apple clang version 12.0.0 (clang-1200.0.32.29) Target: x86_64-apple-darwin20.2.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Does it not support MacOS and UNIX?
The text was updated successfully, but these errors were encountered:
It is because of #define int long long. Change int main(int argc, char **argv) to signed main(signed argc, char **argv) works.
#define int long long
int main(int argc, char **argv)
signed main(signed argc, char **argv)
Sorry, something went wrong.
c4 does not know about the type signed, so whilst it compiles with gcc it can't interpret itself anymore.
signed
At the top of the file is a line:
This causes issues on some compilers. Instead try:
#define int long
gcc -o c4 c4.c
No branches or pull requests
I got a error when build c4 in macos 10.15
My gcc version
Does it not support MacOS and UNIX?
The text was updated successfully, but these errors were encountered: