Recent

Author Topic: Uses Variants but not found  (Read 3858 times)

goldenfox

  • New Member
  • *
  • Posts: 47
Uses Variants but not found
« 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: 11916
Re: Uses Variants but not found
« 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: http://lazarus-ccr.sourceforge.net/fpcdoc/ref/refsu18.html#x46-520003.7.1

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11452
  • FPC developer.
Re: Uses Variants but not found
« 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
Re: Uses Variants but not found
« 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

  • Administrator
  • Hero Member
  • *
  • Posts: 11452
  • FPC developer.
Re: Uses Variants but not found
« 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.

goldenfox

  • New Member
  • *
  • Posts: 47
Re: Uses Variants but not found
« Reply #5 on: October 22, 2014, 03:44:11 pm »
I'm currently using the trunk. I first encountered this problem in LazReport. When I hold ctrl + hover over Variants unit, it doesn't highlight unlike the Menus unit in the screeenshot below.

http://goo.gl/qS96lk

The project compiles but sometimes don't due to missing Variants unit.
« Last Edit: October 22, 2014, 03:48:16 pm by goldenfox »

 

TinyPortal © 2005-2018