### Bookstore

 Computer Math and Games in Pascal (preview) Lazarus Handbook

### Recent

#### goldenfox

• New Member
• Posts: 47
« on: October 22, 2014, 11:18:44 am »
I always see this "Uses Variants" in examples but I can't seem to find its location. Does anyone know what's inside Variants?

#### wp

• Hero Member
• Posts: 10469
« Reply #1 on: October 22, 2014, 12:06:29 pm »
It's in fpc\source\rtl}inc and contains just what its name says: variants: **://lazarus-ccr.sourceforge.net/fpcdoc/ref/refsu18.html#x46-520003.7.1

#### marcov

• Hero Member
• Posts: 10484
• FPC developer.
« Reply #2 on: October 22, 2014, 01:06:39 pm »
(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.

#### goldenfox

• New Member
• Posts: 47
« Reply #3 on: October 22, 2014, 01:50:40 pm »
Thanks for the info. But I'm wondering why sometimes the compiler spits out error that it cannot find the unit Variants? Any ideas?

#### marcov

• Hero Member
• Posts: 10484
• FPC developer.
« Reply #4 on: October 22, 2014, 02:17:01 pm »
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.

• New Member
• Posts: 47