[fpc-pascal]Bigger problem than external variables in FPC
Michael Van Canneyt
michael.vancanneyt at wisa.be
Thu Nov 23 08:52:07 CET 2000
On Wed, 22 Nov 2000, md wrote:
> The brain teaser related to the use of external variables stems from the
> fact
> that certain compilation modes require the use of {$MODE FPC} while
> other modes require {$DELPHI}
>
> This is what is causing some variables declared as external to spit the
> compiler error.
>
> Is it possible to use the ($MODE FPC} compiler switch to change the
> compilation mode on the fly?
No. A unit as a whole is compiled in 1 mode. The solution is to declare the
variable in the interface of a small separate unit, which is then compiled
with the correct mode.
Michael.
>
> Thanks,
>
> Mark Diener
>
>
>
> The solution is the -Sd compiler switch does not allow for the external
> variables to compile correctly.
>
> I will just turn it off and then back on for a short bit
>
> md wrote:
> >
> > Another brain teaser:
> >
> > Page 47 of PROG.PDF refers to external variables. I am trying to create
> > a shared library if FPC
> > and also trying to access those variables from executables in linux.
> >
> > FPC Linux->
> >
> > var
> > arg1 : integer ; cvar ; external ;
> >
> > Spits compiler error that
> >
> > Fatal: Syntax Error, : expected but ; found
> >
> > Does the reference to external variables work under Linux work?
> >
> > Can variables be exported out of shared libraries under linux?
> >
> > Mark
> >
> > _______________________________________________
> > fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> > http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
More information about the fpc-pascal
mailing list