You are not logged in.
Pages: 1
Hello,
I get this warning when I compile synpdf with Delphi 2007:
synpdf_proj.dpk(43) Warning: W1032 Exported package threadvar 'SynCommons.SynLogFileIndex' cannot be used outside of this package
Other than setting to DCC_PACKAGED_THREADVAR false in the .dproj file, do you guys any alternative to get rid of this warning?
Is it safe to ignore "SynLogFileIndex: TSynLogFileIndex" and maybe "CurrentHandleExceptionSynLog: TSynLog" in SynCommons.pas?
Thanks,
Rod
Offline
We have moved logging threadvars and associated structures into hidden internal declaration, for better work with packages (avoid W1032 warning).
See http://synopse.info/fossil/info/1080b93549
Using threadvar within a package is safe by definition.
But exporting them is not supported by windows.
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 Delphi 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.
Thanks for the feedback!
Offline
Thanks for replying ab. Will try the latest version of your code.
Rod
Offline
Pages: 1