You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
~/Desktop/midi-parser-master/src$ gcc midi-parser.c -o midi-parser
Undefined symbols for architecture arm64:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
// same with make
The text was updated successfully, but these errors were encountered:
You're trying to compile it, not as an object file, but as an executable.
It is meant to be compiled with your own program that will make use of it,
hence why it has no main function. It is not caused by the arm64 architecture.
To compile with your program, you can either do this:
gcc yourprogram.c midi-parser.c -o midi-parser
Where yourprogram.c will actually contain a main() function, and everything making use of midi-parser.
Or, you can compile it to object first using -c, then compile the other objects,
and finally, combine them together in an executable:
~/Desktop/midi-parser-master/src$ gcc midi-parser.c -o midi-parser
Undefined symbols for architecture arm64:
"_main", referenced from:
implicit entry/start for main executable
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
// same with make
The text was updated successfully, but these errors were encountered: