Forum > Beginners

Uses Variants but not found

(1/2) > >>

I always see this "Uses Variants" in examples but I can't seem to find its location. Does anyone know what's inside Variants?

It's in fpc\source\rtl}inc and contains just what its name says: variants:

(in 2.7.1 it is in package rtl-objpas, directory fpcsrc\packages\rtl-objpas\src\inc )

In general 2.7.1 has less units in RTL, because the RTL is compiled three-four times when compiling FPC.

Thanks for the info. But I'm wondering why sometimes the compiler spits out error that it cannot find the unit Variants? Any ideas?

Shouldn't happen with release versions of FPC. Release versions are compiled with options that avoid automated recompilation (e.g. on a similarly named includefile). If it still happens, it might be an unit with the same name as an RTL unit in your search path, or something else majorly wrong.

If you are trying with 2.7.1, as a former RTL unit, variants is one of the first units that is missing if the compiler can find the RTL, but not packages.


[0] Message Index

[#] Next page

Go to full version