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

Hiding data between C modules.

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



Joined: 19 Mar 2004
Posts: 1

View user's profile Send private message

Hiding data between C modules.
PostPosted: Fri Mar 19, 2004 7:55 am     Reply with quote

Hello,
I want to be able to specify a main module which contains my main() function in main.c. I then want to be able to be able to implement some other function in another module, made up of module1.c, and the declaration of the function in module1.h. I should be able to get at the function, by including module1.h in my main.c file, and then accessing the function in module.c from my main function.

I should be able to do this, certainly in C++, but is this not available to me in C?

Cheers,

Rob Wilson
dyeatman



Joined: 06 Sep 2003
Posts: 1933
Location: Norman, OK

View user's profile Send private message

No Linker in CCS
PostPosted: Fri Mar 19, 2004 8:42 am     Reply with quote

The CCS software does not have a linker like C++ (or HiTech) so you have to <INCLUDE> all your modules/submodules in MAIN.C somewhere.

However, you can <include> them at the end of MAIN.C and use the standard prototype (or an .H file with the prototypes) at the start if you dont want them all up front.

Regards
guest
Guest







yes, sad really
PostPosted: Sat Apr 24, 2004 12:09 am     Reply with quote

I've just read this reply, and my heart sank. I have never come across such a serious limitation in a compiler tool set. Oh, well, CANDO.
Steve H
Guest







PostPosted: Sat Apr 24, 2004 8:47 pm     Reply with quote

Golly - This is a PIC with very limited resources, not some PC with 512 megs of RAM. You can relocate 20 megs of program space nearly anywhere in 512 meg of ram. On a PIC when every bit counts it's not such a wise thing to do.

I like the simple/straightforward way that this compiler works - no funny business going on behind my back.

Steve H.
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