Re: gcc vs g++
Re: gcc vs g++
- Subject: Re: gcc vs g++
- From: Jim Ingham <email@hidden>
- Date: Fri, 26 Aug 2005 13:18:26 -0700
When you use the "gcc" driver, it doesn't add the C++ support
libraries to the link phase. If you want to link a C++ app, you need
to use g++.
Xcode uses g++.
Jim
On Aug 26, 2005, at 1:13 PM, Markian Hlynka wrote:
ok, I'm a bit confused. I thought that gcc and g++ could be used
more or less interchangeably on the command line. But, I just created
main.cpp:
#include <iostream>
using namespace std;
int main()
{
cout<<"Hello World!"<<endl;
}
This compiles fine using: g++ main.cpp
but if I use: gcc main.cpp
it fails with linker errors; presumably because of the name space.
What's going on here? am I missing something? what will xcode do?
Thanks,
Markian
----
Early to bed and early to rise, makes a man stupid and blind in the
eyes.
--Mazer Rackham
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >gcc vs g++ (From: Markian Hlynka <email@hidden>) |