Recent

Author Topic: IFDEF Misunderstandig in using BGRABitmapNoGui Package  (Read 2559 times)

simin_sh

  • Full Member
  • ***
  • Posts: 143
IFDEF Misunderstandig in using BGRABitmapNoGui Package
« on: June 02, 2016, 02:14:42 pm »
Hi
i saw a misunderstanding IFDEF in lazarus, when i create a new simple program in lazarus, and then add BgraBitmapPack4NoGui as its dependency, then add units BgraBitmap and BgraBitmapTypes in uses section, then i type TBgraBitmap. and go to its doc(by holding ctrl and going to where it is defined in BGRABitmap unit), i saw that LCL in IFDef is active, as you can see in first screenshot! which it should not be.
where is the problem to cause this misunderstanding for lazarus???
any idea??
(second screenshot is my project view

I am using:
BGRABitmap on SVN
Lazarus 1.6
Windows 10)

its my code:
Code: Pascal  [Select][+][-]
  1. program Project1;
  2.   uses
  3.     BGRABitmap, BGRABitmapTypes;
  4. begin
  5.     TBGRABitmap.
  6. end.
  7.  
  8.  
« Last Edit: June 02, 2016, 02:20:34 pm by simin_sh »
OS Windows 10 - Lazarus 1.7 - FPC 3.1.1

lainz

  • Hero Member
  • *****
  • Posts: 3764
  • Leandro Diaz
Re: IFDEF Misunderstandig in using BGRABitmapNoGui Package
« Reply #1 on: June 02, 2016, 04:16:46 pm »
The same here, maybe we need to define the application is a nogui one via macros or something?

PD: I have also BGRABitmap pack LCL installed and bgracontrols.

Thaddy

  • Hero Member
  • *****
  • Posts: 10516
Re: IFDEF Misunderstandig in using BGRABitmapNoGui Package
« Reply #2 on: June 02, 2016, 04:37:54 pm »
The same here, maybe we need to define the application is a nogui one via macros or something?

PD: I have also BGRABitmap pack LCL installed and bgracontrols.

If the parser "is not exactly the same/ does not parse exactly the same" as the one the compiler is using we won't get anywhere soon. Problem is: that one is too slow for an IDE. I tried.

circular

  • Hero Member
  • *****
  • Posts: 3508
    • Personal webpage
Re: IFDEF Misunderstandig in using BGRABitmapNoGui Package
« Reply #3 on: June 02, 2016, 10:33:36 pm »
Hmmm... we could add some compiler options in the package to help the directive parser of the IDE.

In the meantime, maybe the simplest would be to go in bgrabitmap.inc and to comment the following line.

EDIT: I've added some options in the package. I invite you to have a try with latest SVN/Git.  8-)
« Last Edit: June 02, 2016, 10:41:37 pm by circular »
Conscience is the debugger of the mind

simin_sh

  • Full Member
  • ***
  • Posts: 143
Re: IFDEF Misunderstandig in using BGRABitmapNoGui Package
« Reply #4 on: June 03, 2016, 11:42:22 am »
Yes,done!
I updated bgrabitmap, its going to right place when i use bgrabitmapNoGui, and i go to the doc, IFDEF LCLwin32 is deactive, as you can see in screenshot. 
OS Windows 10 - Lazarus 1.7 - FPC 3.1.1

 

TinyPortal © 2005-2018