MPLAB IDE v7.10

Discussion in 'Programmer's Corner' started by harami, Mar 13, 2012.

  1. harami

    Thread Starter Member

    Jun 20, 2011
    66
    0
    im using MPLAB IDE v7.10 to weight my programme. Im writing my code in C language, hence i have downloaded C18 compiler as i am using PIC18f452. however when i build my project, i get this error (attached pic).

    How do i execute this error??
     
    • 11.png
      11.png
      File size:
      167.8 KB
      Views:
      22
  2. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,887
    1,016
    Well the error is fairly self explanatory. It cannot find the file pic18f452.h.

    That is because there is not such file at least not from microchip. The file name probably needs to be p18f452.h.
     
  3. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    You can not just take a C program written for specific C compiler. And use it in another C compiler. Without some rewriting or porting. Also, your MPLAB version is quite old. As it is free I would recommend an update. But I would not recommend using MPLABX yet.
     
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
    One often missed and ill understood area of MPLAB is the project build area. For and C compiler you can set additional folders to search here (for libraries and include files). C18 also needs the library path set (it usually points to the correct place, you just have to accept that).

    On the menu click Project | Build Options... | Project and select the Directories tab. Use the drop down box to select what to see (include or library).
     
  5. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,887
    1,016
    I believe the header directories are set when you install the compiler but for some reason the library directory is not set.

    But the issue here (at least initially) is an incorrect header file name.
     
Loading...