[SOLVED] GCC compiler error for C++ program

Status
Not open for further replies.

vead

Full Member level 5
Joined
Nov 27, 2011
Messages
285
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,298
Location
india
Activity points
3,815
Hello
I was trying to compile basic c++ program on GCC compiler but when I compile program. Compiler show some error
Program code
Code:
#include <iostream>
using namespace std;

int main(void) 
{
    cout << "Hello, World!";
    return 0;
}
Error


What's the reason ? How to solve problem ?
 

include -lstdc++ in your command and check whether 'lib' folder is installed.
 

Hey pancho_hideboo thanks, This command g++ -o exm exm.cpp is working. Thank's sirzbf
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…