can't locate my include files

D

don

I was trying to compile a .c source file using bcc on my winxp system but
the only way this would work is if I put the stdio.h file in the same folder
as the source file, even though my include statement said this #include
<c:\myfiles\include> which I thought would solve the "can't find error" I
was getting for my printf statements etc. etc.
 
T

Thomas Lumley

I was trying to compile a .c source file using bcc on my winxp system but
the only way this would work is if I put the stdio.h file in the same folder
as the source file, even though my include statement said this #include
<c:\myfiles\include> which I thought would solve the "can't find error" I
was getting for my printf statements etc. etc.

If you want to include stdio.h you should just be able to write
#include <stdio.h>

If you want #include to find files other than the Standard headers
then read your compiler documentation to find out how it handles files
and paths. This is officially implementation-defined, ie, the
implementation is required to document it.

-thomas
 
U

user923005

I was trying to compile a .c source file using bcc on my winxp system but
the only way this would work is if I put the stdio.h file in the same folder
as the source file, even though my include statement said this #include
<c:\myfiles\include> which I thought would solve the "can't find error" I
was getting for my printf statements etc. etc.

See section 10 of the C-FAQ.
 
D

don

Have you looked? The first hit on a google of "c faq" looks good to me.

There were so many hits that I wanted to narrow it down - the fastest way to
an answer is to ask the Right question.
 
J

Joachim Schmitz

Peter Pichler said:
http://www.c-faq.com/

There used to be regular reminders posted to the group.
What happened to them?
They still happen about once a month (or fortnight?) and there was one
resently, earlyier this week or near the end of the week before

Bye, Jojo
 

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,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top