Variables in c++ builder XE2 not initializing when unit was called by component
问题 I have a unit (WebFunctions.h) with the declaration String RawURLAllowedChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ~.-_"; This unit works well in the app. But when I add a component which also declares WebFunctions.h , the initialization of RawURLAllowedChars does not occurs ( RawURLAllowedChars = NULL ). To get the app back to work, plus remove the class declaration of the component is still necessary delete the WebFunctions.obj file. Note: Any declarations in .cpp file,