Menu

Include header-files on sdcc for Win

Help
Anonymous
2000-12-05
2001-03-14
  • Anonymous

    Anonymous - 2000-12-05

    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

     
    • Rudi van Els

      Rudi van Els - 2001-01-05

      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.

       
    • Harald Niesche

      Harald Niesche - 2001-03-14

      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.

       

Log in to post a comment.

MongoDB Logo MongoDB