Hello,
I installed Rev 2.21- Win32-Borland. I tried to test the complier and gave the following code:
#include <REG51.H>
void main(void) {
P1 = 0x55; }
I put the Header file in the same directory like the exe-file but the compiler doesn't find it.
Anybody know why I can't include Header files?
Regads, Stefan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What you can trie doing ( it's not the right practise but it works) is changing your
#include <REG51.H>
for
#inlude "REG51.H"
so your compiler wil look for the include file in the directory your source code is in, and not in the default include directory of your instalation.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I installed Rev 2.21- Win32-Borland. I tried to test the complier and gave the following code:
#include <REG51.H>
void main(void) {
P1 = 0x55; }
I put the Header file in the same directory like the exe-file but the compiler doesn't find it.
Anybody know why I can't include Header files?
Regads, Stefan
What you can trie doing ( it's not the right practise but it works) is changing your
#include <REG51.H>
for
#inlude "REG51.H"
so your compiler wil look for the include file in the directory your source code is in, and not in the default include directory of your instalation.
This behaviour is what some people expect of a C compiler:
#include <lala.h>
looks *only* in the include path (set with -I)
whereas
#include "lala.h"
also looks in the current directory.
If you want to make . part of the include path, add the switch -I. to your compiler command line.