Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Terminal/C++ compiler



On 5/2/02 11:01 AM, "George Japaridze" <email@hidden> wrote:

> Hi everyone,
>
> I need help with compiling C++ programs. When I try to compile from the
> Terminal Hi.cc which is
>
> #include <iostream.h>
> int main()
> {
> cout << "Hello World\n";
> return (0);\
> }
>
> using
> g++ -g -oHi Hi.cc
> or c++
> or cpp
>
> nothing happens: either I get the message "++: oHi: No such file or
> directory
> Hi.cc:1: iostream.h: No such file or directory", or the cursor freezes.
>
> How should I compile C++ using Terminal?

Put a space between the "-o" and the "Hi" part.

Eg:
g++ -g -o Hi Hi.cc
_______________________________________________
darwinos-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwinos-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Terminal/C++ compiler (From: George Japaridze <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.