Re: C++
Re: C++
- Subject: Re: C++
- From: Syd Polk <email@hidden>
- Date: Fri, 13 Aug 2004 17:08:27 -0700
On Aug 13, 2004, at 4:02 PM, digish reshamwala wrote:
Hi...
OK I tried your suggestions. And compiled using the command
g++ -Wall g++ -Wall -O0 -o hello hello.cpp
But it game the following error:
"ld: can't locate file for: -lcrt1.o"
This is a different problem.
If you install Xcode 1.0 CD on a system later than 10.3.0, you will get
this error, and the Xcode 1.1 software update will not help, as it only
updates the Xcode application.
You need to install the full packages from Xcode 1.1, Xcode 1.2 or
Xcode 1.5 releases.
I mean, there is no syntax error in my prev code too. It gave me the
same
error as above, when I tried simple command:
g++ main.cpp
I have attached .cpp file just in case...
Also, how can i use xcode for this??
thanks
-digish
----- Original Message -----
From: goochrules! <email@hidden>
Date: Friday, August 13, 2004 3:43 pm
Subject: Re: C++
On Fri, 13 Aug 2004 14:50:38 -0700, digish reshamwala
<email@hidden>
wrote:> Hey..
How do I compile & run simple C++ program in Mac OS X Panther??
The program is:
#include <iostream.h>
int main()
{
cout << "Hello World!" << endl;
return 0;
}
Please reply soon!
The g++ or gcc under terminal doesn't seems to work.
try this (name it hello.cpp):
#include <iostream> // note: no .h
int main(int argc, char* argv[]) {
std::cout << "hello world" << std::endl; // note: namespace
qualifications
return 0;
}
compile with:
g++ -Wall -O0 -o hello hello.cpp
-- Matthew Pletzer
-- email@hidden
[demime 0.98b removed an attachment of type application/octet-stream
which had a NAME of main.cpp]
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.
Syd Polk
Apple Computer
Technology EPM, Mac OS X Development Tools
+1 408 974-0577
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.
References: | |
| >Re: C++ (From: digish reshamwala <email@hidden>) |