mám jednoduchý program:
#include <iostream>
int main()
{
std::cout << "Ahoj\n";
return 0;
}
ked ho chcem skompilovat pomocou gcc, v termináli mi vypíše toto :
/tmp/ccg3Yx05.o: In function `main':
pokus.cpp:(.text+0x14): undefined reference to `std::cout'
pokus.cpp:(.text+0x19): 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*)'
/tmp/ccg3Yx05.o: In function `__static_initialization_and_destruction_0(int, int)':
pokus.cpp:(.text+0x41): undefined reference to `std::ios_base::Init::Init()'
pokus.cpp:(.text+0x46): undefined reference to `std::ios_base::Init::~Init()'
/tmp/ccg3Yx05.o:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
prosím poradte, vopred dakujem
nejde spustiť program v C++ :/
Re: nejde spustiť program v C++ :/
Nemá tam byť using namespace std; ?
Re: nejde spustiť program v C++ :/
Pouzi g++
Re: nejde spustiť program v C++ :/
g++ pomohlo, vdaka 
//autoeditácia príspevku (15 Jan 2012, 17:38)
neviem prečo som tam dával gcc ked sa to používa pri jazyku C hmm
//autoeditácia príspevku (15 Jan 2012, 17:38)
neviem prečo som tam dával gcc ked sa to používa pri jazyku C hmm