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 support@ccsinfo.com

PCW 4.099 and MPLab 8.40 question

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



Joined: 13 Feb 2007
Posts: 6

View user's profile Send private message

PCW 4.099 and MPLab 8.40 question
PostPosted: Tue Oct 27, 2009 9:33 am     Reply with quote

Hello,

I have the above setup, running under XP SP3. I can compile code in the CCS IDE, but the same code gives errors in MPLab. I have (I think) setup MPLab to use the CCS compiler correctly.

I don't understand why the results are different, surely the code that physically creates machine code from C code must be the same in both cases??

The PIC target is 18F6527 in both cases, the code in the .c and .h files is identical.

Thanks
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Oct 27, 2009 10:55 am     Reply with quote

1. What are the errors ?

2. What is the total number of files in the project ?

3. Are using the "one big file" method (no linker, with all modules
added to a main source file with #include) ?
Or, are you trying to use Multiple Compilation Units?

4. What is your compiler version?
colinbrenton



Joined: 13 Feb 2007
Posts: 6

View user's profile Send private message

PostPosted: Tue Oct 27, 2009 11:39 am     Reply with quote

Hi PCM,

Thanks for the response, I made the mistake of adding all my .c and .h files to the Sources in the project, and declaring them with #include "file.c"

This obviously caused problems, as the same file is declared twice. Things like IO declarations in the affected files showed up as errors. All is good now I have only the #include statements, and only the main .c file in the sources list.

Thanks,

Colin
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