Re: gcc-4.1

2006-09-11 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 09/11/06 23:58, H.S. wrote:
> Rocky Ou wrote:
> 
[snip]
> Others have given you good replies. I would add that do not name
> your output file (the executable) as "test". A "test" command
> already exists in Linux.

But not in DOS/Windows... :\

- --
Ron Johnson, Jr.
Jefferson LA  USA

Is "common sense" really valid?
For example, it is "common sense" to white-power racists that
whites are superior to blacks, and that those with brown skins
are mud people.
However, that "common sense" is obviously wrong.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFBkqaS9HxQb37XmcRAnQuAKCdoPmMAcpa6CsKa+c18FIhaHO0GQCfZmu/
BOJ4Icm/G/5rxT+cqP9jP6E=
=TjT3
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: gcc-4.1

2006-09-11 Thread CaT
On Tue, Sep 12, 2006 at 12:58:49AM -0400, H.S. wrote:
> Others have given you good replies. I would add that do not name your 
> output file (the executable) as "test". A "test" command already exists 
> in Linux.

I don't believe it matters much. Only the crazy and the inept have . in
their $PATH and it's not in there by default. If he has put it in there
then well, it's a good way to learn I guess. :)

-- 
"To the extent that we overreact, we proffer the terrorists the
greatest tribute."
- High Court Judge Michael Kirby


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: gcc-4.1

2006-09-11 Thread H.S.

Rocky Ou wrote:


Hey all here it is

[EMAIL PROTECTED]:~$ ls -l c_0912.c
-rw-r--r-- 1 lover lover 103 2006-09-12 10:58 c_0912.c

[EMAIL PROTECTED]:~$ more c_0912.c
#include 

using namespace std;

int main()
{
 out<<"Hey, YOU:) I'm good"\n;
 cin.get();
}

[EMAIL PROTECTED]:~$ gcc c_0912.c -o test
c_0912.c:1:20: error: iostream: No such file or directory
c_0912.c:3: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â
before ânamespaceâ
c_0912.c: In function âmainâ:
c_0912.c:7: error: âoutâ undeclared (first use in this function)
c_0912.c:7: error: (Each undeclared identifier is reported only once
c_0912.c:7: error: for each function it appears in.)
c_0912.c:7: error: stray â\â in program
c_0912.c:7: error: expected â;â before ânâ
c_0912.c:8: error: âcinâ undeclared (first use in this function)


It seem gcc still not doing the job because os some missing stuff.

Can any of you help me out please?

Thanks a lot in advance!

Rocky



Others have given you good replies. I would add that do not name your 
output file (the executable) as "test". A "test" command already exists 
in Linux.


->HS


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: gcc-4.1

2006-09-11 Thread Joshua J. Kugler
On Monday 11 September 2006 19:11, Rocky Ou wrote:
> On 9/12/06, Kevin Mark <[EMAIL PROTECTED]> wrote:
> > On Mon, Sep 11, 2006 at 10:32:09PM +0800, Rocky Ou wrote:
> > > Hey,
> > >
> > > Thanks for your reply but it still not doing the work.
> > >
> > > [EMAIL PROTECTED]:~$ gcc good.c
> > > gcc: good.c: No such file or directory
> > > gcc: no input files
> > > [EMAIL PROTECTED]:~$
> > >
> > >
> > > Can any of you help me please?
> >
> > Hi Rocky,
> >
> > just to double check:
> >
> > gcc is a C compiler
> >
> > the basic use is:
> >
> > gcc myprog.c
> >
> > where myprog.c is a C program, not an empty or non-existant file, and
> > the file name ends in .c as this extension implies that it is C source
> > code.
> >
> > would it be possible to show us the output of 'ls -l good.c'?
> >
> > would it be possible to show us the contents of the good.c file?
> >
> > cheers,
> > Kev
> > --
> >
> > |  .''`.  == Debian GNU/Linux == |   my web site:   |
> > |
> > | : :' :  The  Universal | debian.home.pipeline.com |
> > |
> > | `. `'  Operating System| go to counter.li.org and |
> > |   `-http://www.debian.org/ |be counted! #238656   |
> > | my keysever: pgp.mit.edu   | my NPO: cfsg.org |
> >
> > -BEGIN PGP SIGNATURE-
> > Version: GnuPG v1.4.5 (GNU/Linux)
> >
> > iD8DBQFFBcUnv8UcC1qRZVMRAtcjAJ4pyzQ6j8Gwn/ia+6cyG3wPqvFs3wCfY9aG
> > IkpS2DamK0Akz+Rbr3oMols=
> > =4VCD
> > -END PGP SIGNATURE-
>
> Hey all here it is
>
> [EMAIL PROTECTED]:~$ ls -l c_0912.c
> -rw-r--r-- 1 lover lover 103 2006-09-12 10:58 c_0912.c
>
> [EMAIL PROTECTED]:~$ more c_0912.c
> #include 
>
> using namespace std;
>
> int main()
> {
>   out<<"Hey, YOU:) I'm good"\n;
>   cin.get();
> }
>
> [EMAIL PROTECTED]:~$ gcc c_0912.c -o test
> c_0912.c:1:20: error: iostream: No such file or directory
> c_0912.c:3: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â
> before ânamespaceâ
> c_0912.c: In function âmainâ:
> c_0912.c:7: error: âoutâ undeclared (first use in this function)
> c_0912.c:7: error: (Each undeclared identifier is reported only once
> c_0912.c:7: error: for each function it appears in.)
> c_0912.c:7: error: stray â\â in program
> c_0912.c:7: error: expected â;â before ânâ
> c_0912.c:8: error: âcinâ undeclared (first use in this function)
>
>
> It seem gcc still not doing the job because os some missing stuff.
>
> Can any of you help me out please?
>
> Thanks a lot in advance!
>
> Rocky

In addition to Ron's comments, that should be 'cout' not 'out.'

j

-- 
Joshua Kugler   
Lead System Admin -- Senior Programmer
http://www.eeinternet.com
PGP Key: http://pgp.mit.edu/  ID 0xDB26D7CE
PO Box 80086 -- Fairbanks, AK 99708 -- Ph: 907-456-5581 Fax: 907-456-3111



Re: gcc-4.1

2006-09-11 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 09/11/06 22:11, Rocky Ou wrote:
> On 9/12/06, Kevin Mark <[EMAIL PROTECTED]> wrote:
>> On Mon, Sep 11, 2006 at 10:32:09PM +0800, Rocky Ou wrote:
[snip]
> Hey all here it is
> 
> [EMAIL PROTECTED]:~$ ls -l c_0912.c
> -rw-r--r-- 1 lover lover 103 2006-09-12 10:58 c_0912.c
> 
> [EMAIL PROTECTED]:~$ more c_0912.c
> #include 
> 
> using namespace std;
> 
> int main()
> {
>  out<<"Hey, YOU:) I'm good"\n;
>  cin.get();
> }
> 
> [EMAIL PROTECTED]:~$ gcc c_0912.c -o test
> c_0912.c:1:20: error: iostream: No such file or directory
[snip]

The c compiler is not the c++ compiler.  That would be g++.

You *really* need to google around for a tutorial or HOWTO on
software development in the Unix environment.

BTW, I think there's a couple of bugs in your code.

  $ g++ c_0912.c
  c_0912.c:7: error: stray '\' in program
  c_0912.c: In function 'int main()':
  c_0912.c:7: error: 'out' was not declared in this scope
  c_0912.c:7: error: expected `;' before 'n'

When I put the \n inside the ", this was the result:

  $ g++ c_0912.c
  c_0912.c: In function 'int main()':
  c_0912.c:7: error: 'out' was not declared in this scope



- --
Ron Johnson, Jr.
Jefferson LA  USA

Is "common sense" really valid?
For example, it is "common sense" to white-power racists that
whites are superior to blacks, and that those with brown skins
are mud people.
However, that "common sense" is obviously wrong.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFBiiiS9HxQb37XmcRAvXmAJ9BQBYL0O+f2XcKVkw34XNwwOi/8gCfVjPs
/gDao1TPa/3SH5FCalIh/Lg=
=JunR
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: gcc-4.1

2006-09-11 Thread Rocky Ou

On 9/12/06, Kevin Mark <[EMAIL PROTECTED]> wrote:

On Mon, Sep 11, 2006 at 10:32:09PM +0800, Rocky Ou wrote:
> Hey,
>
> Thanks for your reply but it still not doing the work.
>
> [EMAIL PROTECTED]:~$ gcc good.c
> gcc: good.c: No such file or directory
> gcc: no input files
> [EMAIL PROTECTED]:~$
>
>
> Can any of you help me please?

Hi Rocky,

just to double check:

gcc is a C compiler

the basic use is:

gcc myprog.c

where myprog.c is a C program, not an empty or non-existant file, and
the file name ends in .c as this extension implies that it is C source
code.

would it be possible to show us the output of 'ls -l good.c'?

would it be possible to show us the contents of the good.c file?

cheers,
Kev
--
|  .''`.  == Debian GNU/Linux == |   my web site:   |
| : :' :  The  Universal | debian.home.pipeline.com |
| `. `'  Operating System| go to counter.li.org and |
|   `-http://www.debian.org/ |be counted! #238656   |
| my keysever: pgp.mit.edu   | my NPO: cfsg.org |


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFBcUnv8UcC1qRZVMRAtcjAJ4pyzQ6j8Gwn/ia+6cyG3wPqvFs3wCfY9aG
IkpS2DamK0Akz+Rbr3oMols=
=4VCD
-END PGP SIGNATURE-




Hey all here it is

[EMAIL PROTECTED]:~$ ls -l c_0912.c
-rw-r--r-- 1 lover lover 103 2006-09-12 10:58 c_0912.c

[EMAIL PROTECTED]:~$ more c_0912.c
#include 

using namespace std;

int main()
{
 out<<"Hey, YOU:) I'm good"\n;
 cin.get();
}

[EMAIL PROTECTED]:~$ gcc c_0912.c -o test
c_0912.c:1:20: error: iostream: No such file or directory
c_0912.c:3: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â
before ânamespaceâ
c_0912.c: In function âmainâ:
c_0912.c:7: error: âoutâ undeclared (first use in this function)
c_0912.c:7: error: (Each undeclared identifier is reported only once
c_0912.c:7: error: for each function it appears in.)
c_0912.c:7: error: stray â\â in program
c_0912.c:7: error: expected â;â before ânâ
c_0912.c:8: error: âcinâ undeclared (first use in this function)


It seem gcc still not doing the job because os some missing stuff.

Can any of you help me out please?

Thanks a lot in advance!

Rocky



Re: gcc-4.1

2006-09-11 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 09/11/06 21:01, Rocky Ou wrote:
> On 9/12/06, Kevin Mark <[EMAIL PROTECTED]> wrote:
>> On Mon, Sep 11, 2006 at 10:32:09PM +0800, Rocky Ou wrote:
>>> Hey,
>>> 
>>> Thanks for your reply but it still not doing the work.
>>> 
>>> [EMAIL PROTECTED]:~$ gcc good.c gcc: good.c: No such file or
>>> directory gcc: no input files [EMAIL PROTECTED]:~$
>>> 
>>> 
>>> Can any of you help me please?
>> 
>> Hi Rocky,
>> 
>> just to double check:
>> 
>> gcc is a C compiler
>> 
[snip]
> 
> Hey all,
> 
> Thank you very much for all of your reply and help! I really
> appreciate it.
> 
> I misunderstood the gcc I thout it would be some apps like
> xemacs. Now I have the right idea.

Actually, [x]emacs (and vim) and gcc and gdb and ctags and make can
be made into a semi-IDE.

(I wouldn't be surprised if you could plug cvs and/or svn into the
mix, also.)

- --
Ron Johnson, Jr.
Jefferson LA  USA

Is "common sense" really valid?
For example, it is "common sense" to white-power racists that
whites are superior to blacks, and that those with brown skins
are mud people.
However, that "common sense" is obviously wrong.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFBiJES9HxQb37XmcRAh/KAJ9ugvDmggWBbQ6naHD8qPAPCAtvBQCeOH3Y
xVP/fwy4+2tWVLiNhfGp7ho=
=ZRb/
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: gcc-4.1

2006-09-11 Thread Rocky Ou

On 9/12/06, Kevin Mark <[EMAIL PROTECTED]> wrote:

On Mon, Sep 11, 2006 at 10:32:09PM +0800, Rocky Ou wrote:
> Hey,
>
> Thanks for your reply but it still not doing the work.
>
> [EMAIL PROTECTED]:~$ gcc good.c
> gcc: good.c: No such file or directory
> gcc: no input files
> [EMAIL PROTECTED]:~$
>
>
> Can any of you help me please?

Hi Rocky,

just to double check:

gcc is a C compiler

the basic use is:

gcc myprog.c

where myprog.c is a C program, not an empty or non-existant file, and
the file name ends in .c as this extension implies that it is C source
code.

would it be possible to show us the output of 'ls -l good.c'?

would it be possible to show us the contents of the good.c file?

cheers,
Kev
--
|  .''`.  == Debian GNU/Linux == |   my web site:   |
| : :' :  The  Universal | debian.home.pipeline.com |
| `. `'  Operating System| go to counter.li.org and |
|   `-http://www.debian.org/ |be counted! #238656   |
| my keysever: pgp.mit.edu   | my NPO: cfsg.org |


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFBcUnv8UcC1qRZVMRAtcjAJ4pyzQ6j8Gwn/ia+6cyG3wPqvFs3wCfY9aG
IkpS2DamK0Akz+Rbr3oMols=
=4VCD
-END PGP SIGNATURE-



Hey all,

Thank you very much for all of your reply and help! I really appreciate it.

I misunderstood the gcc I thout it would be some apps like xemacs. Now
I have the right idea.

You guys helped me as a newbie a lot!

Thanks again!





--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: gcc-4.1

2006-09-11 Thread Rocky Ou

On 9/12/06, Kevin Mark <[EMAIL PROTECTED]> wrote:

On Mon, Sep 11, 2006 at 10:32:09PM +0800, Rocky Ou wrote:
> Hey,
>
> Thanks for your reply but it still not doing the work.
>
> [EMAIL PROTECTED]:~$ gcc good.c
> gcc: good.c: No such file or directory
> gcc: no input files
> [EMAIL PROTECTED]:~$
>
>
> Can any of you help me please?

Hi Rocky,

just to double check:

gcc is a C compiler

the basic use is:

gcc myprog.c

where myprog.c is a C program, not an empty or non-existant file, and
the file name ends in .c as this extension implies that it is C source
code.

would it be possible to show us the output of 'ls -l good.c'?

would it be possible to show us the contents of the good.c file?

cheers,
Kev
--
|  .''`.  == Debian GNU/Linux == |   my web site:   |
| : :' :  The  Universal | debian.home.pipeline.com |
| `. `'  Operating System| go to counter.li.org and |
|   `-http://www.debian.org/ |be counted! #238656   |
| my keysever: pgp.mit.edu   | my NPO: cfsg.org |


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFBcUnv8UcC1qRZVMRAtcjAJ4pyzQ6j8Gwn/ia+6cyG3wPqvFs3wCfY9aG
IkpS2DamK0Akz+Rbr3oMols=
=4VCD
-END PGP SIGNATURE-





Hey all,

Thank you very much for all of your reply and help! I really appreciate it.

I misunderstood the gcc I thout it would be some apps like xemacs. Now
I have the right idea.

You guys helped me as a newbie a lot!

Thanks again!
Rocky


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: gcc-4.1

2006-09-11 Thread Kevin Mark
On Mon, Sep 11, 2006 at 10:32:09PM +0800, Rocky Ou wrote:
> Hey,
> 
> Thanks for your reply but it still not doing the work.
> 
> [EMAIL PROTECTED]:~$ gcc good.c
> gcc: good.c: No such file or directory
> gcc: no input files
> [EMAIL PROTECTED]:~$
> 
> 
> Can any of you help me please?

Hi Rocky,

just to double check:

gcc is a C compiler

the basic use is:

gcc myprog.c

where myprog.c is a C program, not an empty or non-existant file, and
the file name ends in .c as this extension implies that it is C source
code.

would it be possible to show us the output of 'ls -l good.c'?

would it be possible to show us the contents of the good.c file?

cheers,
Kev
-- 
|  .''`.  == Debian GNU/Linux == |   my web site:   |
| : :' :  The  Universal | debian.home.pipeline.com |
| `. `'  Operating System| go to counter.li.org and |
|   `-http://www.debian.org/ |be counted! #238656   |
| my keysever: pgp.mit.edu   | my NPO: cfsg.org |


signature.asc
Description: Digital signature


Re: gcc-4.1

2006-09-11 Thread Michael Marsh

On 9/11/06, Rocky Ou <[EMAIL PROTECTED]> wrote:

On 9/11/06, Michael Marsh <[EMAIL PROTECTED]> wrote:
> On 9/11/06, Rocky Ou <[EMAIL PROTECTED]> wrote:
> > [EMAIL PROTECTED]:~$ gcc good.c
> > gcc: good.c: No such file or directory
> > gcc: no input files
> > [EMAIL PROTECTED]:~$
>
> Silly question but, is there a file called "good.c" in that directory?

No. What I want to do is use gcc to make a file or start gcc.


That's not how gcc works.  It's a compiler, not an interactive
application.  You'll need to use either a text editor or an IDE to
create your source code files.  gcc only works on existing and
complete files, which it then turns into either object files or
executables.

There are plenty of books and online tutorials that should tell you
the basics of writing C code.

--
Michael A. Marsh
http://www.umiacs.umd.edu/~mmarsh
http://mamarsh.blogspot.com


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: gcc-4.1

2006-09-11 Thread Michael Marsh

On 9/11/06, Rocky Ou <[EMAIL PROTECTED]> wrote:

[EMAIL PROTECTED]:~$ gcc good.c
gcc: good.c: No such file or directory
gcc: no input files
[EMAIL PROTECTED]:~$


Silly question but, is there a file called "good.c" in that directory?

--
Michael A. Marsh
http://www.umiacs.umd.edu/~mmarsh
http://mamarsh.blogspot.com


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: gcc-4.1

2006-09-11 Thread Rocky Ou

Hey,

Thanks for your reply but it still not doing the work.

[EMAIL PROTECTED]:~$ gcc good.c
gcc: good.c: No such file or directory
gcc: no input files
[EMAIL PROTECTED]:~$


Can any of you help me please?


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: gcc-4.1

2006-09-10 Thread Ron Johnson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 09/11/06 01:14, Rocky Ou wrote:
> Hey list,
> 
> I'm using Debian sid. And I have gcc-4.1 installed on it. It seem I can not
> even start the aplication. Blow are my few tries.
> 
> [EMAIL PROTECTED]:~$ gcc filename
> gcc: filename: No such file or directory
> gcc: no input files
> [EMAIL PROTECTED]:~$ gcc-4.1 good
> gcc-4.1: good: No such file or directory
> gcc-4.1: no input files

gcc (and most unix apps, for that matter) does *not* presume a file
extension.  So, try this:

$ gcc good.c

- --
Ron Johnson, Jr.
Jefferson LA  USA

Is "common sense" really valid?
For example, it is "common sense" to white-power racists that
whites are superior to blacks, and that those with brown skins
are mud people.
However, that "common sense" is obviously wrong.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFBP+CS9HxQb37XmcRAtxpAKCJE+Y7Mg6Zfi36nZedL2qhULR/1ACgg8HD
pPwt78Vxd9kxc2L/zYqT4NI=
=ZWi6
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]