Sign in Join

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

Mailing lists / fpc-pascal / 2008-09

external variable

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Felipe Monteiro de Carvalho

Hello,

Is ist possible to declare a external variable like in C?

In the Cocoa headers there are some variables declared as external, like this:

APPKIT_EXTERN NSString *NSToolbarSpaceItemIdentifier;

How would it be possible to access them in Pascal?

var NSToolbarSpaceItemIdentifier: CFStringRef; external;

Doesn't work.

thanks,

Felipe Monteiro de Carvalho
Jonas Maebe
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote 5 lines
APPKIT_EXTERN NSString *NSToolbarSpaceItemIdentifier; How would it be possible to access them in Pascal? var NSToolbarSpaceItemIdentifier: CFStringRef; external;
var NSToolbarSpaceItemIdentifier: CFStringRef; cvar; external;

(the cvar specifier ensures that the name is properly mangled for the target platform)

Jonas