Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-05

Graphics unit and DLLs

10 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

matt shaffer

So I've been tinkering with DLLs and Lazarus.. and I came across a problem. It won't let me import graphics. If I do "uses graphics" it says it can't find it. If I include the LCL in the compiler options, it gets an error with other pascal files. If I add graphics as the only compiler option, it'll white 'cause it's not a directory. All I want is my friend, tcanvas :( -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20090526/c2e42b8d/attachment.html>

Reply by email

Mattias Gaertner
to matt shaffer
Show quoted text 6 lines
So I've been tinkering with DLLs and Lazarus.. and I came across a problem. It won't let me import graphics. If I do "uses graphics" it says it can't find it. If I include the LCL in the compiler options, it gets an error with other pascal files. If I add graphics as the only compiler option, it'll white 'cause it's not a directory. All I want is my friend, tcanvas :(

I don't know what you mean with 'include the LCL in the compiler options'. Normally you add the LCL via the project inspector to your dependencies.

Mattias

Reply by email

matt shaffer
to Mattias Gaertner

Compiler options as in:Project -> Compiler options . But on second glance, it doesn't appear that that would help anything.

Well what you suggested (Project inspector dependencies) seemed to work. It recognized the graphics unit and let me have a tcanvas variable, and the quick compile worked fine, but the build failed with:

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

Line 201 is the end of the file "end."

My memory just caught up with me actually: Haven't others discussed how the LCL doesn't work in DLLs? I'm sure they have, and that's what I seem to be trying to do (even if it's just one lowly tcanvas), so I guess it's doomed for failure.

On Tue, May 26, 2009 at 12:40 PM, Mattias Gaertner <

Show quoted text 23 lines
wrote: On Tue, 26 May 2009 12:14:06 -0400 matt shaffer wrote: > So I've been tinkering with DLLs and Lazarus.. and I came across a > problem. It won't let me import graphics. If I do "uses graphics" it > says it can't find it. If I include the LCL in the compiler options, > it gets an error with other pascal files. If I add graphics as the > only compiler option, it'll white 'cause it's not a directory. All I > want is my friend, tcanvas :( I don't know what you mean with 'include the LCL in the compiler options'. Normally you add the LCL via the project inspector to your dependencies. Mattias _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20090526/83c336d3/attachment.html>

Reply by email

Paul Ishenin
to matt shaffer
matt shaffer wrote 24 lines
Compiler options as in: Project -> Compiler options . But on second glance, it doesn't appear that that would help anything. Well what you suggested (Project inspector dependencies) seemed to work. It recognized the graphics unit and let me have a tcanvas variable, and the quick compile worked fine, but the build failed with: project1.lpr(201,1) Error: Undefined symbol: WSRegisterCustomImageList project1.lpr(201,1) Error: Undefined symbol: WSRegisterMenuItem project1.lpr(201,1) Error: Undefined symbol: WSRegisterMenu project1.lpr(201,1) Error: Undefined symbol: WSRegisterMainMenu project1.lpr(201,1) Error: Undefined symbol: WSRegisterPopupMenu project1.lpr(201,1) Error: Undefined symbol: WSRegisterDragImageList project1.lpr(201,1) Error: Undefined symbol: WSRegisterControl project1.lpr(201,1) Error: Undefined symbol: WSRegisterWinControl project1.lpr(201,1) Error: Undefined symbol: WSRegisterGraphicControl project1.lpr(201,1) Error: Undefined symbol: WSRegisterCustomControl project1.lpr(201,1) Error: Undefined symbol: WSRegisterScrollingWinControl project1.lpr(201,1) Error: Undefined symbol: WSRegisterScrollBox project1.lpr(201,1) Error: Undefined symbol: WSRegisterCustomFrame project1.lpr(201,1) Error: Undefined symbol: WSRegisterCustomForm project1.lpr(201,1) Error: Undefined symbol: WSRegisterHintWindow project1.lpr(201,1) Fatal: There were 15 errors compiling module, stopping

If you are using LCL you must add Interfaces unit to your uses section.

Best regards,
Paul Ishenin.

Reply by email

matt shaffer
to Paul Ishenin
Adding interfaces prevents the errors I was getting previously, but a few
remain:project1.lpr(209,1) Error: Undefined symbol:
RESSTR_LCLSTRCONSTS_RSMBOPEN
project1.lpr(209,1) Error: Undefined symbol: RESSTR_LCLSTRCONSTS_RSMBSAVE
project1.lpr(209,1) Error: Undefined symbol: RESSTR_LCLSTRCONSTS_RSMBUNLOCK
project1.lpr(209,1) Error: Undefined symbol:
RESSTR_LCLSTRCONSTS_RSMTAUTHENTICATION

Not sure as to whether it will work in the DLL or not, but thanks for pointing it out.

Paul Ishenin wrote 38 lines
matt shaffer wrote: > Compiler options as in: > Project -> Compiler options . But on second glance, it doesn't appear that > that would help anything. > > Well what you suggested (Project inspector dependencies) seemed to work. > It recognized the graphics unit and let me have a tcanvas variable, and the > quick compile worked fine, but the build failed with: > > project1.lpr(201,1) Error: Undefined symbol: WSRegisterCustomImageList > project1.lpr(201,1) Error: Undefined symbol: WSRegisterMenuItem > project1.lpr(201,1) Error: Undefined symbol: WSRegisterMenu > project1.lpr(201,1) Error: Undefined symbol: WSRegisterMainMenu > project1.lpr(201,1) Error: Undefined symbol: WSRegisterPopupMenu > project1.lpr(201,1) Error: Undefined symbol: WSRegisterDragImageList > project1.lpr(201,1) Error: Undefined symbol: WSRegisterControl > project1.lpr(201,1) Error: Undefined symbol: WSRegisterWinControl > project1.lpr(201,1) Error: Undefined symbol: WSRegisterGraphicControl > project1.lpr(201,1) Error: Undefined symbol: WSRegisterCustomControl > project1.lpr(201,1) Error: Undefined symbol: WSRegisterScrollingWinControl > project1.lpr(201,1) Error: Undefined symbol: WSRegisterScrollBox > project1.lpr(201,1) Error: Undefined symbol: WSRegisterCustomFrame > project1.lpr(201,1) Error: Undefined symbol: WSRegisterCustomForm > project1.lpr(201,1) Error: Undefined symbol: WSRegisterHintWindow > project1.lpr(201,1) Fatal: There were 15 errors compiling module, stopping > If you are using LCL you must add Interfaces unit to your uses section. Best regards, Paul Ishenin. _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20090526/42b946a1/attachment-0001.html>

Reply by email

Paul Ishenin
to matt shaffer
matt shaffer wrote 7 lines
Adding interfaces prevents the errors I was getting previously, but a few remain: project1.lpr(209,1) Error: Undefined symbol: RESSTR_LCLSTRCONSTS_RSMBOPEN project1.lpr(209,1) Error: Undefined symbol: RESSTR_LCLSTRCONSTS_RSMBSAVE project1.lpr(209,1) Error: Undefined symbol: RESSTR_LCLSTRCONSTS_RSMBUNLOCK project1.lpr(209,1) Error: Undefined symbol: RESSTR_LCLSTRCONSTS_RSMTAUTHENTICATION

Don't know what is wrong here. That symbols are defined in the LCLStrConsts unit as resource strings. Maybe some fpc problem? Or maybe you need to remove all your .ppu and .o files and try to clean build.

Best regards,
Paul Ishenin.

Reply by email

matt shaffer
to Paul Ishenin

Doing a clean build worked, thanks.

Paul Ishenin wrote 26 lines
matt shaffer wrote: > Adding interfaces prevents the errors I was getting previously, but a few > remain: > project1.lpr(209,1) Error: Undefined symbol: RESSTR_LCLSTRCONSTS_RSMBOPEN > project1.lpr(209,1) Error: Undefined symbol: RESSTR_LCLSTRCONSTS_RSMBSAVE > project1.lpr(209,1) Error: Undefined symbol: > RESSTR_LCLSTRCONSTS_RSMBUNLOCK > project1.lpr(209,1) Error: Undefined symbol: > RESSTR_LCLSTRCONSTS_RSMTAUTHENTICATION > Don't know what is wrong here. That symbols are defined in the LCLStrConsts unit as resource strings. Maybe some fpc problem? Or maybe you need to remove all your .ppu and .o files and try to clean build. Best regards, Paul Ishenin. _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20090526/998366c3/attachment.html>

Reply by email

Felipe Monteiro de Carvalho
to matt shaffer

The LCL works inside DLLs, I have managed to wrap it and use it in C this way.

Basically if either only the library or only the main program use LCL it works, but if both use the LCL, then there are problems with connecting both parts.

Felipe Monteiro de Carvalho

Reply by email

matt shaffer
to Felipe Monteiro de Carvalho

Ah ok, thanks for clearing that up

On Tue, May 26, 2009 at 9:17 PM, Felipe Monteiro de Carvalho <

Show quoted text 17 lines
wrote: The LCL works inside DLLs, I have managed to wrap it and use it in C this way. Basically if either only the library or only the main program use LCL it works, but if both use the LCL, then there are problems with connecting both parts. -- Felipe Monteiro de Carvalho _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20090526/bfc02d8f/attachment.html>

Reply by email