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

compiler problem ... "No main() function found"

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



Joined: 11 Jun 2008
Posts: 4

View user's profile Send private message

compiler problem ... "No main() function found"
PostPosted: Wed Jun 11, 2008 4:15 pm     Reply with quote

Hi
Warning: newbe!

I created a project in mplab v8 and there are 2 files.

file 1 is just standard c routines.
file 2 is the file with void main () {while(1)dostuff();}

When I build all I get
Executing: "C:\Program files\Picc\CCSC.exe" +FH "C:\code\modemtest\lcd.c" +EXPORT +DF +LN +T +A +M +Z +Y=9 +EA
*** Error 70 "lcd.c" Line 237(0,1): No main() function found
1 Errors, 0 Warnings.

which is true, there is no main function. It's in the next file.

lcd.c is a bit of copy and paste I made from here to drive the lcd on a picdem 2.

The other file compiles just fine (it has a main func of course).


If I put all the code in one file it works.
The manual simply states that all programs need a main() function.
Can someone advise me what could cause this odd behavior?

Thanks

Kevin
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Jun 11, 2008 4:21 pm     Reply with quote

How to use multiple source files with MPLAB:
http://www.ccsinfo.com/forum/viewtopic.php?t=34046

More detailed information on using multiple files with MPLAB.
Read all the links in this thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=32221
kevinyeandel



Joined: 11 Jun 2008
Posts: 4

View user's profile Send private message

PostPosted: Wed Jun 11, 2008 4:25 pm     Reply with quote

Thank you!!!
You must hold the record for the most rapid response!
It works now - I really appreciate your help.
Kevin
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