|
|
View previous topic :: View next topic |
Author |
Message |
Allen Guest
|
moving project from pcw to mplab |
Posted: Wed Aug 20, 2003 5:26 pm |
|
|
Hi guys,
I worte my code by pcw (pcm 3.158), with more than one sorce and hearder file (pj.c, pj.h, slave.c, slave.h, wire.c, wire.h, etc), it just works fine (able to compile, don't have the kit yet).
I tried to creat a project with same source and header file by using the project wizard with MPLAB 6.20. I add all the .c, .h files into the project. However, when i compiled the project, the compiler looked for main() function at every files and return a error messag:
*** Error 70 "wire.c" Line 26(16,17): No MAIN() function found
1 Errors, 0 Warnings.
The main() fuction is implemented at pj.c, does anyone knows what happen to MPLAB that it looks for main() function at every .c file?? And how to fix it! I made mistake creating the project or there's problems with my code or setting??
PS. I'm a newbie with both IDEs and trying to expereice the difference between MPLAB and PCW, so....
thanks
allen
___________________________
This message was ported from CCS's old forum
Original Post ID: 144517118 |
|
|
Charlie U Guest
|
Re: moving project from pcw to mplab |
Posted: Thu Aug 21, 2003 5:23 am |
|
|
:=Hi guys,
:=
:=I worte my code by pcw (pcm 3.158), with more than one sorce and hearder file (pj.c, pj.h, slave.c, slave.h, wire.c, wire.h, etc), it just works fine (able to compile, don't have the kit yet).
:=I tried to creat a project with same source and header file by using the project wizard with MPLAB 6.20. I add all the .c, .h files into the project. However, when i compiled the project, the compiler looked for main() function at every files and return a error messag:
:=*** Error 70 "wire.c" Line 26(16,17): No MAIN() function found
:= 1 Errors, 0 Warnings.
:=
:=The main() fuction is implemented at pj.c, does anyone knows what happen to MPLAB that it looks for main() function at every .c file?? And how to fix it! I made mistake creating the project or there's problems with my code or setting??
:=
:=PS. I'm a newbie with both IDEs and trying to expereice the difference between MPLAB and PCW, so....
:=
:=thanks
:=
:=allen
I haven't used mplab 6.2 yet, but in the previous versions (5.x), you only needed to add the .c file that had your main() declared in it. That file should have #includes for all of your other files. The compiler will find all of the include files by reading this "main" file.
Hope this helps.
___________________________
This message was ported from CCS's old forum
Original Post ID: 144517125 |
|
|
|
|
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
|