I am trying to pass an include file name on the command line to XC32 to select the file to include in the code. Don't ask why, this is not my code, I am just trying to compile it with this compiler without modifying the code ...
I am passing
-DCONFIG_FILE=\"demo_config.h\"
but the compiler does not seem to like this, error message is
error: #include expects "FILENAME" or <FILENAME>
Anyone know how to bend XC32 to my will here to do this correctly?
EDIT: I have confirmed that this works fine on vanilla GCC. On MCHP XC32 I can do this and then it compiles fine
Question
Orunmila
I am trying to pass an include file name on the command line to XC32 to select the file to include in the code. Don't ask why, this is not my code, I am just trying to compile it with this compiler without modifying the code ...
I am passing
but the compiler does not seem to like this, error message is
Anyone know how to bend XC32 to my will here to do this correctly?
EDIT: I have confirmed that this works fine on vanilla GCC. On MCHP XC32 I can do this and then it compiles fine
It seems like when I pass in the filename via the command line something weird and unexpected is happening ...
I used a trick to print the value and the filename is ending up in the code correctly it seems ...
This will produce:
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.