vendredi 27 juillet 2018

installation of Cygwin

I am facing some errors after I installed Cygwin software. I was running a hello world program with proper syntax but it throw some errors

C:\Users\dveer\Desktop>gcc -o hello hello.cpp
/cygdrive/c/Users/dveer/AppData/Local/Temp/ccqjKRym.o:hello.cpp:(.text+0x1c): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/cygdrive/c/Users/dveer/AppData/Local/Temp/ccqjKRym.o:hello.cpp:(.text+0x1c): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/cygdrive/c/Users/dveer/AppData/Local/Temp/ccqjKRym.o:hello.cpp:(.text+0x50): undefined reference to `std::ios_base::Init::Init()'
/cygdrive/c/Users/dveer/AppData/Local/Temp/ccqjKRym.o:hello.cpp:(.text+0x50): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `std::ios_base::Init::Init()'
/cygdrive/c/Users/dveer/AppData/Local/Temp/ccqjKRym.o:hello.cpp:(.rdata$.refptr._ZNSt8ios_base4InitD1Ev[.refptr._ZNSt8ios_base4InitD1Ev]+0x0): undefined reference to `std::ios_base::Init::~Init()'
/cygdrive/c/Users/dveer/AppData/Local/Temp/ccqjKRym.o:hello.cpp:(.rdata$.refptr._ZSt4cout[.refptr._ZSt4cout]+0x0): undefined reference to `std::cout'
collect2: error: ld returned 1 exit status

Aucun commentaire:

Enregistrer un commentaire