> I am trying to port a C++ program from CW6 to GCC (prc-tools 2.0). In
> this program I have a file Customization.h, which contains many
> definitions like this:
> extern const UInt32 appCreator;
> extern const Int16 appVersionNum;
>
> I also have a corresponding file Customization.cpp, which contains
> statements like that:
> const UInt32 appCreator = 'Razr';
> const Int16 appVersionNum = 0x01;
>
> I include the Customization.h into many of my source files, and link
> Customization.o to my project.
>
> Unfortunately, whenever one of my source files accesses one of these
> constants from Customization.h, it crashes, because of an access to
> unallocated memory (according to POSE 3.1). The only indication I have
> for the cause of the problem is the output from build-prc which says:
> SimpleDemo: warning: global data ignored
hmm.. CW -> gcc is a piece of cake in comparison to the other way
around :) gcc -> CW is a nightmare, as you need to recreate all the
resources in constructor and get the resource #defines correct :)
> What might be causing this behavior? What does the warning mean?
seems like it doesn't like your globals :) could be a problem
with the way you are building? what do you see when you type
'make'? a list of commands might help us sort it out :)
have you thought about using a #define for these constants instead?
#define appCreator 'Razr'
#define appVersionNum 0x01
thats how i have been doing it since day one.. is there a need to
store them in a global variable? they are obviously not going to
change, so might be best to declare as constants :)
// az
[EMAIL PROTECTED]
http://www.ardiri.com/ <--- free games!
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/