Sublime Forum

I am getting this error when I am trying to run any program in Sublime Text ..Can you please solve the issue why I can not run it? Thank You

#1

C:\Users\ZIDAN\AppData\Local\Temp\ccjCxNgI.o:new.cpp:(.text+0x24): undefined reference to `std::cout’

C:\Users\ZIDAN\AppData\Local\Temp\ccjCxNgI.o:new.cpp:(.text+0x29): undefined reference to `std::basic_ostream<char, std::char_traits >& std::operator<< <std::char_traits >(std::basic_ostream<char, std::char_traits >&, char const*)’

C:\Users\ZIDAN\AppData\Local\Temp\ccjCxNgI.o:new.cpp:(.text+0x30): undefined reference to `std::basic_ostream<char, std::char_traits >& std::endl<char, std::char_traits >(std::basic_ostream<char, std::char_traits >&)’

C:\Users\ZIDAN\AppData\Local\Temp\ccjCxNgI.o:new.cpp:(.text+0x37): undefined reference to `std::ostream::operator<<(std::ostream& (*)(std::ostream&))’

C:\Users\ZIDAN\AppData\Local\Temp\ccjCxNgI.o:new.cpp:(.text+0x45): undefined reference to `std::cin’

C:\Users\ZIDAN\AppData\Local\Temp\ccjCxNgI.o:new.cpp:(.text+0x4a): undefined reference to `std::istream::operator>>(int&)’

C:\Users\ZIDAN\AppData\Local\Temp\ccjCxNgI.o:new.cpp:(.text+0xdc): undefined reference to `std::cout’

C:\Users\ZIDAN\AppData\Local\Temp\ccjCxNgI.o:new.cpp:(.text+0xe1): undefined reference to `std::ostream::operator<<(int)’

C:\Users\ZIDAN\AppData\Local\Temp\ccjCxNgI.o:new.cpp:(.text+0x10a): undefined reference to `std::ios_base::Init::~Init()’

C:\Users\ZIDAN\AppData\Local\Temp\ccjCxNgI.o:new.cpp:(.text+0x12b): undefined reference to `std::ios_base::Init::Init()’

collect2.exe: error: ld returned 1 exit status

[Finished in 1.4s]

0 Likes

#2

Wild guess: do not use gcc. Use g++.

0 Likes