Show: Object Pascal C++
Display Preferences

W1032 Exported package threadvar '%s.%s' cannot be used outside of this package (Object Pascal)

From Appmethod Topics
Jump to: navigation, search

Go Up to Error and Warning Messages (Object Pascal) Index

Windows does not support the exporting of threadvar variables from a DLL, but since using packages is meant to be semantically equivalent to compiling a project without them, the Object Pascal compiler must somehow attempt to support this construct.

This warning is to notify you that you have included a unit which contains a threadvar in an interface into a package. While this is not illegal, you will not be able to access the variable from a unit outside the package.

Attempting to access this variable may appear to succeed, but it actually did not.

A solution to this warning is to move the threadvar to the implementation section and provide function which will retrieve the variables value.

Personal tools
In other languages