Recent

Author Topic: LCLType, FileUtils, TBitmap in console program  (Read 14295 times)

danny

  • New Member
  • *
  • Posts: 29
LCLType, FileUtils, TBitmap in console program
« on: April 28, 2014, 04:15:17 pm »
What unit use to replace LCL, LCLType, FileUtils and use TBitmap and CopyFile program console in Linux?

Leledumbo

  • Hero Member
  • *****
  • Posts: 8835
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: LCLType, FileUtils, TBitmap in console program
« Reply #1 on: April 28, 2014, 05:09:57 pm »
Depends on what you want to do with them.

danny

  • New Member
  • *
  • Posts: 29
Re: LCLType, FileUtils, TBitmap in console program
« Reply #2 on: April 28, 2014, 06:13:40 pm »
I need to use the functions copyfile (FileCtrl) and also the types of variables TBitmap ...

Leledumbo

  • Hero Member
  • *****
  • Posts: 8835
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: LCLType, FileUtils, TBitmap in console program
« Reply #3 on: April 29, 2014, 03:33:16 am »
Seems like there's no replacement then. You can use NoGUI widgetset or use LCLBase instead of LCL for console programming. The latter doesn't require initialization.

danny

  • New Member
  • *
  • Posts: 29
Re: LCLType, FileUtils, TBitmap in console program
« Reply #4 on: April 29, 2014, 03:10:45 pm »
I put LCLBase and compiled, but gave error in WSimgList. Where reference is it? Below is the compilation error:


/usr/share/lazarus/1.0.6/lcl/units/i386-linux/wsimglist.o: na função `REGISTERCUSTOMIMAGELIST':
/home/mattias/tmp/lazarus1.0.6/lazarus_build/usr/share/lazarus/1.0.6/lcl/./widgetset/wsimglist.pp:266: referência indefinida para `WSRegisterCustomImageList'
/usr/share/lazarus/1.0.6/lcl/units/i386-linux/wsmenus.o: na função `REGISTERMENUITEM':
/home/mattias/tmp/lazarus1.0.6/lazarus_build/usr/share/lazarus/1.0.6/lcl/./widgetset/wsmenus.pp:201: referência indefinida para `WSRegisterMenuItem'
/usr/share/lazarus/1.0.6/lcl/units/i386-linux/wsmenus.o: na função `REGISTERMENU':
/home/mattias/tmp/lazarus1.0.6/lazarus_build/usr/share/lazarus/1.0.6/lcl/./widgetset/wsmenus.pp:212: referência indefinida para `WSRegisterMenu'

Leledumbo

  • Hero Member
  • *****
  • Posts: 8835
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: LCLType, FileUtils, TBitmap in console program
« Reply #5 on: April 29, 2014, 06:21:44 pm »
Oops, you miss 1 unit: Interfaces. Put it as the first unit in the main file.

danny

  • New Member
  • *
  • Posts: 29
Re: LCLType, FileUtils, TBitmap in console program
« Reply #6 on: April 29, 2014, 07:27:53 pm »
Error: Fatal: Can not find unit Interfaces used test_console. Check if package LCL is in the dependencies.

PS: I am developing a console program.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8835
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: LCLType, FileUtils, TBitmap in console program
« Reply #7 on: April 30, 2014, 12:58:00 am »
I missed this line:
Quote
/usr/share/lazarus/1.0.6/
you seem to be using last year release. Can you compile the attached project? Does it still show the same linker message? If yes, then try upgrading to the latest release. The attached project has been tested on 1.2.0. Unlike many other projects, we don't provide support for old version. So whenever something goes wrong, upgrade to latest release first and try to reproduce.

danny

  • New Member
  • *
  • Posts: 29
Re: LCLType, FileUtils, TBitmap in console program
« Reply #8 on: April 30, 2014, 01:17:24 pm »
If I include the unit "Interfaces" in your project, it follows the same error.

hinst

  • Sr. Member
  • ****
  • Posts: 303
Re: LCLType, FileUtils, TBitmap in console program
« Reply #9 on: April 30, 2014, 01:47:42 pm »
Instead of LCLBase package try using LazUtil package (or LazUtils, I'm not sure) and see if it contains required unit

LCLBase requires Interfaces
LazUtils does not
Too late to escape fate

danny

  • New Member
  • *
  • Posts: 29
Re: LCLType, FileUtils, TBitmap in console program
« Reply #10 on: April 30, 2014, 01:52:27 pm »
LCLUtils has not unit "Graphics"

hinst

  • Sr. Member
  • ****
  • Posts: 303
Re: LCLType, FileUtils, TBitmap in console program
« Reply #11 on: April 30, 2014, 01:57:26 pm »
I see. What you are trying to do is not going to work.
If you want your application be independent from OS GUI and be able to work with graphics in memory, then Graphics unit is not what u can use for this because it depends on various other units from LCL which I doubt can be separated from each other

I suggest using Agg library for graphics
Too late to escape fate

danny

  • New Member
  • *
  • Posts: 29
Re: LCLType, FileUtils, TBitmap in console program
« Reply #12 on: April 30, 2014, 02:03:27 pm »
Using Agg libraries?

hinst

  • Sr. Member
  • ****
  • Posts: 303
Re: LCLType, FileUtils, TBitmap in console program
« Reply #13 on: April 30, 2014, 02:12:24 pm »
U can use AGG library from this URL:
https://github.com/graemeg/fpGUI/tree/master/src/corelib/render/software

A crappy sample demonstrating how to use AGG library to generate an image & save it as JPEG:
http://pastebin.com/BXHNjJ9N

find other samples in agg-demos subfolder of repository
Too late to escape fate

danny

  • New Member
  • *
  • Posts: 29
Re: LCLType, FileUtils, TBitmap in console program
« Reply #14 on: April 30, 2014, 02:20:22 pm »
Have you used Agg unit in console program?

I'm asking because I have to redo the code to run on this unit.

 

TinyPortal © 2005-2018