View previous topic :: View next topic |
Author |
Message |
Guest
|
Is there some known problem using #module? |
Posted: Mon Feb 02, 2009 11:13 am |
|
|
Is there some known problem using ?
I ask because I experience problem in my program when I put the #module in. |
|
![](templates/subSilver/images/spacer.gif) |
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Mon Feb 02, 2009 2:53 pm |
|
|
Post your compiler version number.
Describe the problem you get. |
|
![](templates/subSilver/images/spacer.gif) |
Guest
|
|
Posted: Tue Feb 03, 2009 2:48 am |
|
|
Hi
My project is some "c" files and some "h" files (prototyping). The project is a working project with 3000 lines.
I made a backup and want to make more structure in the files.
I put #module in one of the "c" files and the project still compile and run as expected.
But when applying the #module in one more file some malfunction appear in the project it compile without any problem. I then trying to move the keyword #module longer down in the file and I can then get the project to run. I looked in the list file for some compare and it look like the compiler destroy the printf() function all place...
Solution I just drop the #module keyword. |
|
![](templates/subSilver/images/spacer.gif) |
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Tue Feb 03, 2009 3:58 am |
|
|
The #module is a new function of the v4 compiler, it is very well possible you have found a bug.
Always mention your compiler version number so it can be checked to be an old and solved problem or is a new bug. Without version number I'm not going to waste time looking into it. |
|
![](templates/subSilver/images/spacer.gif) |
Guest
|
|
Posted: Tue Feb 03, 2009 5:37 am |
|
|
PIC 18x2455 CCS 4.083.
Maybe try to put some #module in your "c" file and make compile test, but you must compare the "list" file.
I think the "c" file you try it on must deal function to other module, and you then need to make some prototyping, before the #module keyword. |
|
![](templates/subSilver/images/spacer.gif) |
andrewg
Joined: 17 Aug 2005 Posts: 316 Location: Perth, Western Australia
|
|
Posted: Tue Feb 03, 2009 5:49 am |
|
|
Apart from the prototyping issues already mentioned, the typical problem I get is the compiler putting automatically generated compiler functions into modules, eg the multiply and divide functions.
I've worked around that by having a function outside all the modules that performs the required operations to define the needed functions before the modules have a chance to. The function itself isn't called by anything and so gets optimised away. _________________ Andrew |
|
![](templates/subSilver/images/spacer.gif) |
|