I never liked CatComp's source output files. On OS4 I am trying to use it "as is". But I can't get it to compile quite right.
In my protos_globals.h file:
extern struct CatCompArrayType { LONG cca_ID; CONST_STRPTR cca_Str; } CatCompArray[];
so my Locale code can "see" the array for string look up.
GCC gives me a redefinition error of 'struct CatCompArrayType' because CatComp puts this in the created CFILE:
struct CatCompArrayType { LONG cca_ID; CONST_STRPTR cca_Str; }; STATIC CONST struct CatCompArrayType CatCompArray[] = ......
I have tried every combination I can think of to get this to work. What am I doing wrong?
@mritter0
You shouldn't need the CatCompArray to be externally visible. Just make sure that it is included in the file where you implement your GetBuiltInString() function:
This can then be used in your GetString() function like so:
Oh duh me! Moving the one function fixed it. Arg! So simple.
Thanks.