Graphics in DLL lazarus / 39-Graphics ---------------------------------------------------------------------- skaner1900 · 2011-05-01 23:32 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 · 2011-05-01 23:41 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 · 2011-05-02 10:46 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? ---------------------------------------------------------------------- Laksen · 2011-05-02 15:39 You must add "Interfaces" in the uses clause of the main library file. This includes the actual widgetset code required