linker command failed with exit code 1 (use -v to see invocation) šŸ˜¤šŸ˜¤šŸ˜¤ | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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

12th Jan 2018, 7:20 AM
Taha Elhasseen Abdelrahman
Taha Elhasseen Abdelrahman - avatar
3 Respostas
+ 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.
15th Jan 2018, 12:01 AM
Jacob Pembleton
Jacob Pembleton - avatar
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
16th Jun 2018, 2:05 PM
Chris Norris
Chris Norris - avatar
0
Chris Norris Thank you!!
14th Mar 2019, 4:42 PM
Bamberghh
Bamberghh - avatar