By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,694 Members | 1,846 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,694 IT Pros & Developers. It's quick & easy.

Please explain about c

P: n/a
I have downloaded c api that have many h file and c file and one main
file.
I use turbo c compiler.
So I put header files under C:\tc\include
and I put c files under C:\tc\bin
I also declare header file in main program.
But I get the linker error message.
what is the problem?
Is it right to put c file in that folder.
Does c compiler automatically link to c files?
Please help me.

I will be waiting for your reply.
My other mail is sm**@sailormoon.com.
Sometimes I cannot open gmail.

Mar 19 '06 #1
Share this Question
Share on Google+
10 Replies


P: n/a
honey wrote:
I have downloaded c api that have many h file and c file and one main
file.
I use turbo c compiler.
So I put header files under C:\tc\include
and I put c files under C:\tc\bin
Normally, compiled programs are stored under 'bin', not C source files.
Also, it seems those directories belong to TC, so you shouldn't mess with
their content at all.
I also declare header file in main program.
But I get the linker error message.
Which one exactly?
Please help me.
I suggest going to http://accu.org and picking a good book on beginners' C
coding from the reviews section.
I will be waiting for your reply.
My other mail is sm**@sailormoon.com.
Sometimes I cannot open gmail.


Doesn't matter. You are on the Usenet here, and you will not get any
replies to your mailaddresses anyway. The idea is that in public
newsgroups everybody benefits from the discussions - after all, someone
might have the same problems as you do. Please also make sure that you
read a bit about the so-called netiquette for newsgroups.

cheers

Uli

Mar 19 '06 #2

P: n/a

honey wrote:
I have downloaded c api that have many h file and c file and one main
file.
I use turbo c compiler.
So I put header files under C:\tc\include
and I put c files under C:\tc\bin
Did the instructions that came with the API tell you to do that? If
not, why did you do that?
I also declare header file in main program.
But I get the linker error message.
What is the error message?
what is the problem?
Is it right to put c file in that folder.
Does c compiler automatically link to c files?
Please help me.
You need to give us more information. Which API did you download?
What's it for?

I will be waiting for your reply.
My other mail is sm**@sailormoon.com.
Sometimes I cannot open gmail.


Mar 19 '06 #3

P: n/a
honey wrote:
I have downloaded c api that have many h file and c file and one main
file.
I use turbo c compiler.

< rest snipped >

Specific C implementations like Turbo C are off-topic here. Why not try
on one of the Borland groups?

Mar 19 '06 #4

P: n/a
"honey" <al*****@gmail.com> writes:
I have downloaded c api that have many h file and c file and one main
file.
I use turbo c compiler.
So I put header files under C:\tc\include
and I put c files under C:\tc\bin
I also declare header file in main program.
But I get the linker error message.
what is the problem?
Is it right to put c file in that folder.
Does c compiler automatically link to c files?
Please help me.


Different C compilers behave differently; the only thing they all have
in common is that they compile C code.

I have no idea how to import existing C code (your .h and .c files)
into Turbo C. Almost certainly the Turbo C documentation will tell
you exactly how to do this. Read it. If that doesn't work, try a
Google search. If that doesn't work, consider posting to a newsgroup
that's appropriate for your system, perhaps a Windows programming
group.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Mar 19 '06 #5

P: n/a
santosh wrote:
honey wrote:
I have downloaded c api that have many h file and c file and one main
file.
I use turbo c compiler.

< rest snipped >

Specific C implementations like Turbo C are off-topic here. Why not try
on one of the Borland groups?


Why not give someone a hand that obviously has far from enough clue to
decide whether some topic is exactly on topic or off topic? Seriously, I
also redirect people when there are more suitable groups, but with someone
that obviously is a beginner and who's problem isn't even clear (yes, read
the posting and you see that it's not even clear what exactly their
problem is!) this makes little sense.

Uli
Mar 19 '06 #6

P: n/a
Ulrich Eckhardt wrote:
santosh wrote:
honey wrote:

I have downloaded c api that have many h file and c file and one
main file.
I use turbo c compiler.

< rest snipped >

Specific C implementations like Turbo C are off-topic here. Why
not try on one of the Borland groups?


Why not give someone a hand that obviously has far from enough
clue to decide whether some topic is exactly on topic or off
topic? Seriously, I also redirect people when there are more
suitable groups, but with someone that obviously is a beginner
and who's problem isn't even clear (yes, read the posting and
you see that it's not even clear what exactly their problem is!)
this makes little sense.


His questions were all about linking and file locations. None of
that is germane to the language. He is also using an obsolete (but
usable) system, so any of our memories of it are suspect. He was
given a hand - a place to look for information.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
Also see <http://www.safalra.com/special/googlegroupsreply/>
Mar 19 '06 #7

P: n/a
Ulrich Eckhardt <do******@knuut.de> writes:
santosh wrote:
honey wrote:
I have downloaded c api that have many h file and c file and one main
file.
I use turbo c compiler.

< rest snipped >

Specific C implementations like Turbo C are off-topic here. Why not try
on one of the Borland groups?


Why not give someone a hand that obviously has far from enough clue to
decide whether some topic is exactly on topic or off topic? Seriously, I
also redirect people when there are more suitable groups, but with someone
that obviously is a beginner and who's problem isn't even clear (yes, read
the posting and you see that it's not even clear what exactly their
problem is!) this makes little sense.


What better help could we have given him? I, for one, have no clue
how to solve his problem; any direct advice I could have offered would
have been useless.

He's having trouble with the Turbo C compiler, not with the C
programming language. Redirecting him to some place where people
actually know how to use the Turbo C compiler is absolutely the best
help we can give him. (Flaming him for posting something off-topic
would have been unhelpful, but I don't think anyone did that.)

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Mar 19 '06 #8

P: n/a

I am very sorry for my stupid question.
I have no experience in programming and I even don't know which group
should I choose.
Besides I am weak in English so I can't express clearly what I mean.

The question I would like to ask is "how to link header file (.h file)
and source file (.c file) in c"
I downloaded many .h files and .c files. I have noticed that the
functions are declared in .h files and defined in .c files. I don't
know how to link them in main program.

This may be a stupid question and off-topic. If so, I am really sorry
and please forgive me.

Thank you very much for your time.(especially Uli for your kindness.)

I have never used forum before.
I will never forget this experience.

Mar 21 '06 #9

P: n/a
honey wrote:
I am very sorry for my stupid question.
I have no experience in programming and I even don't know which group
should I choose.
Besides I am weak in English so I can't express clearly what I mean.
Quite all right. In future though, please quote the relevant portions
of the post to which you're replying. Some newsreaders do not show
previous articles in a nice manner and most news servers delete older
articles after a period of time. Thus try to make the context of your
posts as self-contained as possible. If you're using Google Groups,
click the 'show options' link at the top of the post to which you're
replying and then click the 'reply' link to post.

Please make sure to read the content at the following links:
<http://cfaj.freeshell.org/google/>
<http://clc-wiki.net/wiki/Introduction_to_comp.lang.c>
The question I would like to ask is "how to link header file (.h file)
and source file (.c file) in c"
I downloaded many .h files and .c files. I have noticed that the
functions are declared in .h files and defined in .c files. I don't
know how to link them in main program.


The .h files are called as 'header files' and they typically contain
data declarations and function prototypes among other things. They
present the 'interface' to the functions implemented in the .c files.
To use a function in a .c file, you include the relevant .h file into
your source file with an INCLUDE statement.

Please read the following good online book to learn the basics of C and
it's associated terminology.

http://publications.gbdirect.co.uk/c_book/

Alternatively buy a good C text like 'The C Programming Language' 2nd
Edition by Kernighan and Ritchie.

Mar 21 '06 #10

P: n/a
On 20 Mar 2006 19:40:14 -0800, in comp.lang.c , "honey"
<al*****@gmail.com> wrote:
The question I would like to ask is "how to link header file (.h file)
and source file (.c file) in c"
I downloaded many .h files and .c files. I have noticed that the
functions are declared in .h files and defined in .c files. I don't
know how to link them in main program.


This is a question about how to use your compiler, and not actually
anything to do with the C language.

You need to read the compiler documentation, since each one is
slightly different. You could also ask in newsgroups specialising in
your compiler.
Mark McIntyre
--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Mar 21 '06 #11

This discussion thread is closed

Replies have been disabled for this discussion.