Recent

Author Topic: Graphics in DLL  (Read 4636 times)

skaner1900

  • Jr. Member
  • **
  • Posts: 59
Graphics in DLL
« on: May 02, 2011, 01:32:17 am »
How to use Graphics in DLL?
When I added 'Graphics'* to uses section I received that error:
NameOfDLL.lpr(1,1) Fatal: Can't find unit Graphics used by NameOfDLL

*Graphics, or Controls, or some else

When I copied all graphic.* files from Lazarus directory, to my Library dir, I saw similar error 'Can't find unit [sth name] used by Graphic'.

Laksen

  • Hero Member
  • *****
  • Posts: 754
    • J-Software
Re: Graphics in DLL
« Reply #1 on: May 02, 2011, 01:41:37 am »
You shouldn't move the files. They are all there

You need to add a dependency on the LCL to the DLL project. That way Lazarus will automatically tell the compiler where to find any required units, and resolve versions correctly

skaner1900

  • Jr. Member
  • **
  • Posts: 59
Re: Graphics in DLL
« Reply #2 on: May 02, 2011, 12:46:43 pm »
Easy :)
but now are appearing a new problems...

NameOfDLL.lpr(52,1) Error: Undefined symbol: WSRegisterCustomImageList
NameOfDLL.lpr(52,1) Error: Undefined symbol: WSRegisterMenuItem
NameOfDLL.lpr(52,1) Error: Undefined symbol: WSRegisterMenu
NameOfDLL.lpr(52,1) Error: Undefined symbol: WSRegisterMainMenu
NameOfDLL.lpr(52,1) Error: Undefined symbol: WSRegisterPopupMenu
NameOfDLL.lpr(52,1) Error: Undefined symbol: WSRegisterDragImageList
NameOfDLL.lpr(52,1) Error: Undefined symbol: WSRegisterControl
NameOfDLL.lpr(52,1) Error: Undefined symbol: WSRegisterWinControl
NameOfDLL.lpr(52,1) Error: Undefined symbol: WSRegisterGraphicControl
NameOfDLL.lpr(52,1) Error: Undefined symbol: WSRegisterCustomControl
NameOfDLL.lpr(52,1) Error: Undefined symbol: WSRegisterScrollingWinControl
NameOfDLL.lpr(52,1) Error: Undefined symbol: WSRegisterScrollBox
NameOfDLL.lpr(52,1) Error: Undefined symbol: WSRegisterCustomFrame
NameOfDLL.lpr(52,1) Error: Undefined symbol: WSRegisterCustomForm
NameOfDLL.lpr(52,1) Error: Undefined symbol: WSRegisterHintWindow
NameOfDLL.lpr(52,1) Fatal: There were 15 errors compiling module, stopping

What's going on?
« Last Edit: May 02, 2011, 12:50:54 pm by skaner1900 »

Laksen

  • Hero Member
  • *****
  • Posts: 754
    • J-Software
Re: Graphics in DLL
« Reply #3 on: May 02, 2011, 05:39:08 pm »
You must add "Interfaces" in the uses clause of the main library file. This includes the actual widgetset code required

 

TinyPortal © 2005-2018