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

compile + link

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



Joined: 13 Apr 2010
Posts: 34
Location: UK

View user's profile Send private message

compile + link
PostPosted: Sun Apr 25, 2010 7:02 pm     Reply with quote

Does anyone separately compile their .c files to object files then link, or do most people just #include all the .c file in a main module (which I gather is the traditional CCS way)?

I'm having problems with the first method and I'm wondering if I'm swimming against the CCS way of doing things.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Apr 26, 2010 12:33 pm     Reply with quote

Many of us don't own the CCS IDE compiler. We use the command line
compilers with MPLAB. So we don't have the option of using multiple
compilation units. We always use the #include method.

Just letting you know why you're not getting a lot of immediate answers.
sjb



Joined: 13 Apr 2010
Posts: 34
Location: UK

View user's profile Send private message

PostPosted: Mon Apr 26, 2010 3:29 pm     Reply with quote

PCM programmer wrote:
Many of us don't own the CCS IDE compiler. We use the command line
compilers with MPLAB. So we don't have the option of using multiple
compilation units. We always use the #include method.

I've tried using MPLAB with the command line tools as well as with the CCS IDE. Both methods will support multiple compilation units (the option is there if you want to use it, I believe). I just can't get it work properly, especially the fuses.

The 'normal' way to build a c program for me (and I had though for most c programmers too) is to divide a project in to small compilation units, each with a .c file. So I was rather surprised to find CCS users do it different. Shocked

I'm coming to ccs from (too) many years experience with other compilers (good and bad). I'd love to get ccs working with multiple compilation units as that feels much more natural for me (and the manual says its possible). It would also allow me to share code between projects much more easily.

Steven
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Apr 26, 2010 3:36 pm     Reply with quote

Quote:

Both methods will support multiple compilation units (the option is there if
you want to use it, I believe).

The option to use MPLAB with multiple compilation units is there, but only
if you buy the full CCS IDE compiler, not with the CCS command line
compilers. See this post from Darren Rook:
http://www.ccsinfo.com/forum/viewtopic.php?t=26954&start=10

CCS has a FAQ page on multiple compilation units, with sample project
files. Maybe it can give you some help:
http://www.ccsinfo.com/faq.php?page=multi_comp_units
sjb



Joined: 13 Apr 2010
Posts: 34
Location: UK

View user's profile Send private message

PostPosted: Mon Apr 26, 2010 3:52 pm     Reply with quote

PCM programmer wrote:
Quote:

Both methods will support multiple compilation units (the option is there if
you want to use it, I believe).

The option to use MPLAB with multiple compilation units is there, but only
if you buy the full CCS IDE compiler, not with the CCS command line
compilers. See this post from Darren Rook:
http://www.ccsinfo.com/forum/viewtopic.php?t=26954&start=10

Oh! That was not obvious.
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