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

multiple compilation units ?

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



Joined: 01 Jul 2007
Posts: 37

View user's profile Send private message

multiple compilation units ?
PostPosted: Sun May 04, 2008 4:33 am     Reply with quote

Hello,

Does anybody know if the 'multiple compilation units' is working with the last version of CCS ?
I'm currently working with 4.053 and this feature seems to be unable to manage the types others than the default ones. In the following example, I receives the error code 112 : function used but not defined.

// main.c
Code:
#include "project.h"
#include "func.h"

void main (void) {
   A_STR_T VAR_A;
   FUNC_A ( VAR_A );
   FUNC_B ( &VAR_A );
}


// project.h
Code:
#include <16F877A.h>
#fuses HS,NOWDT,NOPROTECT,NOLVP
#use delay(clock=20mhz)
#use rs232(BAUD=9600, UART1, STREAM=PC)


// func.h
Code:
typedef struct {int A;} A_STR_T;
// typedef int A_STR_T;

void FUNC_A ( A_STR_T value );
void FUNC_B ( A_STR_T * value );


// func.c
Code:
#include <project.h>
#include "func.h"

void FUNC_A ( A_STR_T value ) {
   printf ( "A" );
}

void FUNC_B ( A_STR_T * value ) {
   printf ( "B" );
}


If however I replace the definition of "A_STR_T" by the one that is commented in func.h, then the code is compiled Shocked
Ken Johnson



Joined: 23 Mar 2006
Posts: 197
Location: Lewisburg, WV

View user's profile Send private message

PostPosted: Mon May 05, 2008 12:51 pm     Reply with quote

I've not yet had the opportunity to get into this, but expect to soon, as new projects commence. So, I recently asked CCS about multiple compilation units. Their response:

"The compiler does support multiple compilation units and it should work just like you would expect.
Today we can not link to Microchips object files however we expect to be able to do so soon."

Let's hope . . .

Ken
Dimmu



Joined: 01 Jul 2007
Posts: 37

View user's profile Send private message

PostPosted: Tue May 06, 2008 3:28 am     Reply with quote

Thank you for the feedback,

I hope it's gonna work as they say in new version of the compiler.


Dimmu
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