Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2011-06

Variable export always uppercase?

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Max Vlasov

Hi,
I'm trying to trick some c-libraries that use errno variable to think that it's located in my sources (Windows, MingGw compiled libraries). if I declare

var
  ___errno: integer;
...
exports
  ___errno;
end.
I still get error
testproj.lpr(27,1) Error: Undefined symbol: ___errno

if I look inside the unit's .o file, I find this symbol uppercase ( ___ERRNO).

I also saw that several issues existed and fixed in the matis about uppercase exports, but they were about functions. Can variables still be exported in uppercase? Or did I go a wrong way and it's not possible to do such trick?

Thanks

Max