ANNOUNCE ggets revised

A

Arthur J. O'Dwyer

Frank Silvermann wrote...

You are new to the C language, aren't you?

FWIW, many MS-DOS (and Windows?) compilers use ".obj" instead of
".o" for object files. So that comment just says that Frank is new
to the /Unix/ world. (His later comments about header files do make
me think he hasn't done a lot of C programming, too. I'm just being
pedantic here.)

-Arthur
 
C

CBFalconer

Keith said:
.... snip ...

The expansion of #include "ggets.h" refers to the identifier FILE;
the expansion of ggets(&line) refers to the identifer stdin. How
exactly do you expect the compiler to resolve these identifiers
without a "#include <stdio.h>"?

(You also have a missing right parenthesis, corrected below).
.... snip ...

Adding a "#include <stdio.h>" to the top of tmp.c corrects the
problem, but the #include <stdio.h>" should be in "ggets.h".

You (plural) have convinced me. I will try to make the change the
next time I revise it. However I didn't alter ggets.h at all this
time, so there is no confusion with the replacement code.
 
C

CBFalconer

Frank said:
CBFalconer wrote:
.... snip ...

There exists no ggets.o file in whatever I unzipped. One is left to
believe that '.o' is a typo or an intermediate file during
compiling-linking.

The .o file (or possibly .obj on some systems, or even something
else) is the result of compiling the .c file to system dependant
object code, which can then be linked into whatever other programs
you like without recompiling ggets. It is relocatable linkable
object code.
 
R

Randy Howard

Richard Heathfield wrote
(in article said:
Randy Howard said:


That's allowed. From what I've seen so far of Mr Silvermann, I have the
impression that he's fairly new to C but far from dense.

Fair enough, but not knowing what a .o file is sort of makes
debating how to best link to C++ code, header file layout, etc.
somewhat pointless.
 
R

Randy Howard

Arthur J. O'Dwyer wrote
(in article
FWIW, many MS-DOS (and Windows?) compilers use ".obj" instead of
".o" for object files. So that comment just says that Frank is new
to the /Unix/ world. (His later comments about header files do make
me think he hasn't done a lot of C programming, too. I'm just being
pedantic here.)

A fair point, I forgot about Windows and funky compilers. I try
to forget it at every opportunity.

Still, I find it difficult to imagine a lot of C programming
background and no exposure to .o before whatsoever. *shrug*
 
A

Al Balmer

Frank Silvermann wrote


You are new to the C language, aren't you?

The less than precise language doesn't help. One doesn't (or at least
I don't) usually speak of "compiling" an object file, and I would have
said ggets.c is a C module, not ggets.
 
R

Richard Bos

Randy Howard said:
Richard Heathfield wrote


Fair enough, but not knowing what a .o file is sort of makes
debating how to best link to C++ code, header file layout, etc.
somewhat pointless.

Not all the world's a VAX^Tgcc compiler.

Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,142
Latest member
arinsharma
Top