View previous topic :: View next topic |
Author |
Message |
Saff Guest
|
invalid option +EXPORT |
Posted: Fri Jul 18, 2008 5:37 am |
|
|
I have some working CCS C code for the 16F88 which compiles fine using MPLAB IDE v8.10 (default settings).
However, the code I have is messy and some of my function code is inside the headers. To tidy up a bit I move the code into a c file and include the header which I have ameded to only include the signatures of my function... now I compile it (using "build all") and I get the error "invalid option +EXPORT". This is the only change made, I've reverted the code and made the changes one by one so I know this is what's causing my problem.
So I've gone from this...
orig.c:
Code: | // some code
#include "includes/tasks/task_encrypt.h"
// some more code |
./includes/tasks/task_encrypt.h:
Code: |
#ifndef TASK_ENCRYPT_DEF_H
#define TASK_ENCRYPT_DEF_H
int TASK_task_encrypt_data(int data[], TASK callback_task) {
// do stuff
} |
To this...
orig.c:
Code: | // some code
#include "includes/tasks/task_encrypt.h"
// some more code |
./includes/tasks/task_encrypt.h:
Code: |
#ifndef TASK_ENCRYPT_DEF_H
#define TASK_ENCRYPT_DEF_H
int TASK_task_encrypt_data(int data[], TASK callback_task);
#endif |
./includes/tasks/task_encrypt.c:
Code: | #include "includes/tasks/task_encrypt.h"
int TASK_task_encrypt_data(int data[], TASK callback_task) {
// do stuff
} |
Build all uses the command line:
C:\Program files\Picc\CCSC.exe" +FM "orig.c" +EXPORT +DF +LN +T +A +M +Z +Y=9 +EA
What does +EXPORT do and why does it not accept this change?
TIA for any help you can offer. |
|
![](templates/subSilver/images/spacer.gif) |
Saff Guest
|
|
Posted: Fri Jul 18, 2008 5:43 am |
|
|
There was an #endif on the end of the original header file too. |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah Guest
|
|
Posted: Fri Jul 18, 2008 7:00 am |
|
|
What version of CCS?.
EXPORT, requires a V4.xxx compiler (and didn't work on the early V4 releases).
EXPORT, potentially generates a relocatable .OBJ file , which can then be linked into a 'main project'.
Look at the entry 'multiple compilation units', in the manual.
Best Wishes |
|
![](templates/subSilver/images/spacer.gif) |
Saff Guest
|
|
Posted: Fri Jul 18, 2008 7:50 am |
|
|
Version 3.229 -
Thanks.
I've had another look and it seems MPLab doesn't use the +EXPORT option for the first set of code but does for the second. I'm not sure if I can persuade it not to (and if it would still correctly compile all my code). Maybe I'll have to leave it as it is but that's a bit horrible. |
|
![](templates/subSilver/images/spacer.gif) |
|