Closed notkspr closed 3 years ago
How are you compiling and running the code, exactly? This seems like a linking issue.
My Code:
mario.c
`
int main(void) { int height; do { height = get_int("Height:"); } while (height < 1 || height > 8);
for (int line = 0; line < height;line++)
{
for (int spaces = height- line; spaces>1; spaces--)
{
printf(" ");
}
for (int hashes = 0; hashes < line +1;hashes++)
{
printf("#");
}
printf("\n");
}
} `
Terminal:
make mario
@Rubix982 Thanks a lot! I solved it using clang -lcs50 -o cash cash.c
@Kasper-Liu I completely forgot about this issue. :facepalm: Happy coding!
Undefined symbols for architecture arm64: "_get_float", referenced from: _main in cash-a0c998.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [cash] Error 1