View previous topic :: View next topic |
Author |
Message |
cerr
Joined: 10 Feb 2011 Posts: 241 Location: Vancouver, BC
|
Moved computers and don't get MPLAB to compile anymore |
Posted: Fri Mar 09, 2012 12:09 pm |
|
|
Hi,
I moved PCs and I don't get CCS to compile anymore for me.
Following code:
Code: |
#include <PIC18F86K22.h>
void main(void)
{
while(1);
}
|
Returns these build messages:
Code: |
Executing: "C:\Program Files (x86)\PICC\Ccsc.exe" +FH "main.c" #__DEBUG=1 +ICD +DF +LN +T +A +M +Z +Y=9 +EA #__18F86K22=TRUE
*** Error 18 "main.c" Line 1(9,24): File can not be opened
Not in project "C:\Users\ron\Desktop\test\PIC18F86K22.h"
*** Error 128 "main.c" Line 3(1,16): A #DEVICE required before this line
2 Errors, 0 Warnings.
Halting build on first failure as requested.
BUILD FAILED: Fri Mar 09 10:01:27 2012
|
How can I get my compuiler back up and running like it's supposed to be(opening "<>-includes " from my "C:\Program Files (x86)\PICC\Devices" directory)?
I also tried to add the header manually to my test project but that didn't do it either...
Thank you!!!
Ron |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19539
|
|
Posted: Fri Mar 09, 2012 12:21 pm |
|
|
I'd guess you copied the project/compiler across, rather than:
1) making a new project.
2) re-installing.
You need to do both. The install sets up the path to the compiler directories, and when you make a project it includes these paths, so you then need to make a new project which will inherit these settings.
Best Wishes |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Mar 09, 2012 12:22 pm |
|
|
Quote: | #include <PIC18F86K22.h>
|
That's not how CCS header files are named. Are you possibly trying
to compile C18 code with the CCS compiler ? That won't work. They
are not compatible. |
|
|
cerr
Joined: 10 Feb 2011 Posts: 241 Location: Vancouver, BC
|
|
Posted: Fri Mar 09, 2012 12:49 pm |
|
|
Ttelmah wrote: | You need to do both. |
Yep, created a new project and also called CCS up and they'll send me an installable compiler version over.
PCM programmer wrote: | Quote: | #include <PIC18F86K22.h>
|
That's not how CCS header files are named. |
Hoops, of course i had 18F86K22.h in my code, just mistypped it...that however isn't the reason why it doesn't compile. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Mar 09, 2012 1:18 pm |
|
|
Right, but it shows you like to take shortcuts and not check things.
You gotta do everything precisely. Even then, things will still fail
from time to time. |
|
|
jeremiah
Joined: 20 Jul 2010 Posts: 1354
|
|
Posted: Fri Mar 09, 2012 2:12 pm |
|
|
What I had to do in MPLAB when that happened to me was go into the project settings and go to the section for the CCS compiler. There is an option to add include directories. I added both the devices and drivers folders to that, and it worked. Lately it seems like MPLAB can't do it automatically anymore like it used to. |
|
|
|