I had copied a project that was builder in older MPLAB X IDE 3.x which I was opening in freshly installed MPLAB X IDE 4.05 but it was complaining about not find plib.h library which was referenced in the code.
I did a couple of days of digging into and now found the problem using this microchip form post, which says
The installer “PIC32 Legacy Peripheral Libraries – Windows” from here
asks for the installation directory during installation, even if you have only one XC32 version installed.
In my case it proposes: C:\Program Files (x86)\Microchip\xc32\v1.40
which is “wrong”, because I only have v1.43 installed.
I.e. it proposed the wrong directory, and if you simply accept, it will use that wrong path.
As a consequence you cannot use the peripheral library (without changing project paths)
Install it again into your “current” compiler directory.
I could imagine its a bug, but they won’t fix it for the legacy PLIB.
which was exactly the problem. The problem was older version of MPLAB X IDE uses legacy drivers (plib) while they have been abandoned in the newer version. Verse legacy drivers are not shipped with the latest version of MPLAX X 4.05.
To sum up the problem for a newbie, to make older code work in the latest MPLAB X, you have to do the following.
- Install MPLAB X V4.05 (latest by today)
- Intall X32 C-Compiler (you have to download this sperate)
- Install “PIC32 Peripheral LIbrary” (You have to download it first)
- When you install PIC32 Peripheral Library, it will try to install itself in XC32/1.40 folder but you have to change that. This is the trick that you have to apply. Simply supply it the path to XC32 folder, which must already exist and continue with the installation.
That should solve your problem of “not finding plib.h” which is the peripheral library for legacy (older) MPLAB.