What does the compile-time error “Undefined symbols for architecture x86_64” mean?

When you compile the file, the compiler invokes the linker which tries to generate an executable. But it cannot because you didn’t provide a function named main which is the function that will be executed when your program is launched.

Either you don’t want to run the linker because you want to compile several files separately then combine then. In that case, use the -c flag to tell the compiler to skip the link stage.

Or either you want to execute the compiled file. Then you need to implement the function main.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)