According to the documentation, PilRC can only handle defines of the
form #define symbol value
where symbol is a valid name, and value is an integer. With v2.8, PilRC
will gracefully ignore #defines it doesn't support, and will tell you
they're being skipped. If you need to have more complex #define
support, you might consider setting up your build scripts to manually
run a c preprocessor on your resource file before running pilrc.
-Thomee Wright-
Mayank Pradhan wrote:
>
> In the rcp file I have a #include myfile.h
>
> The myfile.h contains #define. The IDs for resource
> and the .c are defined in this file.
> For eg.
> #define myform1 1000
> #define label1form1 1100
> ....
>
> All works fine upto here.
>
> The compilation problem occurs when I include a macro
> #define mystr1 "New Stirng"
>
> I get the compilation error at the above line where
> this string macro is defined.
>
> The error message says
> "Constant expected, got New String"
>
> My conclusion from this is that it is a constraint in
> pilrc compiler. It doesnt allow string macros to be
> included, is this right? But is there a workaround,
> besides generating everything dynamically.
>
> You can simulate the same problem by just including a
> the macro mystr1 in your include file referenced by
> your .rcp file.
>
> CORRECTION I am using Pilrc v2.4
>
> Thanks,
> Mayank.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/