+ 1
linker command failed with exit code 1 (use -v to see invocation) 😤😤😤
I am using termux on android with clang compiler and nano editor , but I have faced problem through compiling this programme #include <iostream> using namespace std ; int main() { cout << "I wanna print something" ; } error message " linker command failed with exit code 1 (use -v to see invocation)" appear , how could I solve this problem? sorry for bad English
3 Respuestas
+ 2
The code will work just fine, an error involving “linker” means that there are problems with the projects linker settings. I’m not sure exactly what the problem is, but you should try a tutorial for setting up a project in your IDE because there’s probably something in the settings that needs to be changed.
0
streams are c++, so try using clang++ instead of clang.
<code>
clang++ test.cpp -o test.out
./test.out
</code>
edit: reference https://wiki.termux.com/wiki/Package_Management#Compiling_software_.28GNU_autotools_based.29
0
Chris Norris Thank you!!