MPLAB IDE v7.10

Thread Starter

harami

Joined Jun 20, 2011
66
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??
 

Attachments

spinnaker

Joined Oct 29, 2009
7,830
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.
 

t06afre

Joined May 11, 2009
5,934
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.
 

ErnieM

Joined Apr 24, 2011
8,377
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).
 

spinnaker

Joined Oct 29, 2009
7,830
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.
 
Top