CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Moved computers and don't get MPLAB to compile anymore

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
cerr



Joined: 10 Feb 2011
Posts: 241
Location: Vancouver, BC

View user's profile Send private message

Moved computers and don't get MPLAB to compile anymore
PostPosted: Fri Mar 09, 2012 12:09 pm     Reply with quote

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: 19538

View user's profile Send private message

PostPosted: Fri Mar 09, 2012 12:21 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Mar 09, 2012 12:22 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Mar 09, 2012 12:49 pm     Reply with quote

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. Smile

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

View user's profile Send private message

PostPosted: Fri Mar 09, 2012 1:18 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Fri Mar 09, 2012 2:12 pm     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group