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

Can only use one .c file in MPLAB IDE

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



Joined: 18 Feb 2004
Posts: 16
Location: UK

View user's profile Send private message

Can only use one .c file in MPLAB IDE
PostPosted: Tue Nov 15, 2011 8:14 am     Reply with quote

Hello,

I have just got the latest release (4.126) of the PCH command line compiler and have run the CCS setup program to use it with MPLAB IDE.

However, when I try and build a project containing more than a single .c file it says:

Code:
Executing: "C:\Program files\Picc\CCSC.exe" +FH "main.c" +EXPORT  #__DEBUG=1 +ICD +DF +LN  +T +A +M -Z +Y=9 +EA #__18F4550=TRUE
*** Error 7 "C:\Program Files\PICC\devices\18F4550.h" Line 204(2,6): Invalid Pre-Processor directive  Export requires IDE
      1 Errors,  0 Warnings.
BUILD FAILED: Tue Nov 15 14:09:00 2011


But when I remove the other .c files (except the one containing main()) the project compiles successfully.

What am I doing wrong?

Thanks, Simon
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Nov 15, 2011 12:07 pm     Reply with quote

Quote:
when I try and build a project containing more than a single .c file

Read the answers and see the links in this thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=44990
monkeytennis



Joined: 18 Feb 2004
Posts: 16
Location: UK

View user's profile Send private message

PostPosted: Tue Nov 15, 2011 12:22 pm     Reply with quote

Okay, so it looks like I needed an IDE edition.

I'll stick to doing it using a single .c file.

Thanks for your help. Smile
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Nov 15, 2011 1:18 pm     Reply with quote

Well, you can use multiple files, you just have to #include them in the
main C source file, as shown in the linked examples in that thread.
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