> > >it will compile on Win32, but just refuse to compile on Linux. When you
> > >search on the error the compiler generates, you'll find the docs that
> > >explain that exporting of variables is only supported on Win32.
> >
> > Under linux it is not supported because linux works different with shared
> > libraries. For procedures we could add an extra jmp with the new name. But
> > for variables it's not possible as for the imported variables it is not
> > know if they need an extra derefence (that is what WIn32 is using for dll
> > variables) or that they need to be imported bij the dynamic linker.

> I see. Is there any chance of getting this feature implemented, or would it
> be better to try to write a library in C that in turn uses my library in FPC
> to provide the functionality that it should?

I wouldn't do that. I'd make getters and setters (functions and procedures
wrappers to read/write vars) to access them. These even can get handy later
to get things threadsafe.
_______________________________________________
fpc-devel maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to