cpp file is: Undefined symbols for architecture arm64: "std::_1::basic_ostream >::operator<<(int)", referenced from: _main in test-980e3e.o "std::_1::cout", referenced from: _main in test-980e3e.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) I am not sure which part of my compilation process is wrong, since I assumed having both apps opened through terminal would make them emulate as x86 and thus generate x86 code. The error I get on trying to compile any. To be honest, I'm not super clear on the OS-level differences between the switch, so I'm not sure if any of the prior steps are right. I also tried adding the -b x86 flag directly there to see if it might just try to compile to an x86 target and then run that through the terminal which is through Rosetta. The program is just a simple sorting algorithm un-rust my C++. I also have my terminal set to open with Rosetta (x86 to arm64 translation layer Apple added). The command I'm running is: gcc test.cpp -o test I am writing this in VSCode Insiders, which is built for apple silicon. Hi guys, I'm on a recent M1 laptop, and playing around with some C++.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |