Export 'symbol' in module 'module' references 'symbol' in unit 'unit'

From RAD Studio
Jump to: navigation, search

Go Up to C++ Linker Error and Warning Messages

You are attempting to export a symbol from a module that is not a unit (does not contain the #pragma package(smart_init) directive) and it references a symbol in a unit. This is not allowed because if you have such a symbol, then someone can link to its import; and when the import is called, it calls into the unit code. If the client of the exported non-unit function did not reference anything from the unit, it will never be initialized.

Solutions

To fix this error, include the #pragma package(smart_init) directive in the non-unit.