Sign in Join

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

Mailing lists / lazarus / 2011-06

Uses Clause in LPR

15 messages · 5 people ·

Reply by email Subscribe to this list Your subscription

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

Rafael Tuim Elias

Hi all

In a CGI application, when I place a component from zeoslib, is inserted into the uses clause the ZComponent unit declaration. This makes it impossible to build the project, showing the following error:

cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterCustomImageList
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterMenuItem
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterMenu
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterMainMenu
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterPopupMenu
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterDragImageList
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterControl
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterWinControl
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterGraphicControl
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterCustomControl
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterScrollingWinControl
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterScrollBox
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterCustomFrame
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterCustomForm
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterHintWindow
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterCustomScrollBar
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterCustomGroupBox
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterCustomComboBox
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterCustomListBox
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterCustomEdit
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterCustomMemo
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterButtonControl
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterCustomButton
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterCustomCheckBox
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterToggleBox
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterRadioButton
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterCustomStaticText
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterCustomLabel
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterCustomBitBtn
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterCustomSpeedButton
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterCustomPage
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterCustomNotebook
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterShape
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterCustomSplitter
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterPaintBox
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterCustomImage
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterBevel
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterCustomRadioGroup
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterCustomCheckGroup
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterCustomLabeledEdit
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterCustomPanel
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterCustomTrayIcon
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterCommonDialog
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterFileDialog
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterOpenDialog
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterSaveDialog
cgiproject1.lpr(15,1) Error: Undefined symbol:
WSRegisterSelectDirectoryDialog
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterColorDialog
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterColorButton
cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterFontDialog
cgiproject1.lpr(15,1) Fatal: There were 50 errors compiling module, stopping

whether i remove the zcomponent declaration, build normaly.

Can anyone tell me if this is a bug on zeos or lazarus?

Best Regards

Rafael Tuim Elias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110610/f8bd8919/attachment.html>

Reply by email

Unknown author
to Rafael Tuim Elias
Rafael Tuim Elias wrote 11 lines
Hi all In a CGI application, when I place a component from zeoslib, is inserted into the uses clause the ZComponent unit declaration. This makes it impossible to build the project, showing the following error: cgiproject1.lpr(15,1) Error: Undefined symbol: WSRegisterCustomImageList whether i remove the zcomponent declaration, build normaly. Can anyone tell me if this is a bug on zeos or lazarus?

It is a bug in zeos. It means there is a dependency on the LCL.

Michael.

Reply by email

Unknown author
to Rafael Tuim Elias: Dear Michael I found the same bug in the LazSolutions, and i reported to the developer,…
Rafael Tuim Elias wrote 8 lines
Dear Michael I found the same bug in the LazSolutions, and i reported to the developer, who has answered me. http://code.google.com/p/lazsolutions/issues/detail?id=22 He said, that bug is a IDE bug.

It is not a bug. It is correct behaviour.

The LazSolutionsRT should have the 'add to uses clause' flag not set: in the package dialog, choose options. then

'Package options' - 'Usage'

and then

uncheck the 'Add package unit to uses section'
(no check mark should be present).

For Zeos, the same is probably true, but I do not know how the zeos package works.

It can be that after this, the same error occurs. If so, it means that somewhere in the zeos code, the lazarus 'interfaces' unit is used, or a unit that depends on the LCL. This unit must be rewritten if you want to use zeos in a CGI or any webserver project.

Michael.

Reply by email

silvioprog
to Unknown author

2011/6/10 :

Show quoted text 6 lines
It is not a bug. It is correct behaviour. The LazSolutionsRT should have the 'add to uses clause' flag not set: in the package dialog, choose options. then 'Package options' - 'Usage'

I should leave it unchecked in (all) my package(s)?

Show quoted text 14 lines
and then uncheck the 'Add package unit to uses section' (no check mark should be present). For Zeos, the same is probably true, but I do not know how the zeos package works. It can be that after this, the same error occurs. If so, it means that somewhere in the zeos code, the lazarus 'interfaces' unit is used, or a unit that depends on the LCL. This unit must be rewritten if you want to use zeos in a CGI or any webserver project. Michael.
Silvio Cl?cio =============================================== Blog - <silvioprog.com.br> Twitter - <twitter.com/silvioprog> LazSolutions - <code.google.com/p/lazsolutions> Lazarus-BR - <groups.google.com.br/group/lazarus-br?hl=pt-BR> =============================================== ? ?* Conhe?a nosso canal IRC sobre Lazarus: #lazarus-br * ===============================================

Reply by email

silvioprog
to Mattias Gaertner: On Fri, 10 Jun 2011 11:09:20 -0300 I added a comment. Mattias

2011/6/10 Mattias Gaertner :

I added a comment.

Thx. ~^

Mattias
Silvio Cl?cio =============================================== Blog - <silvioprog.com.br> Twitter - <twitter.com/silvioprog> LazSolutions - <code.google.com/p/lazsolutions> Lazarus-BR - <groups.google.com.br/group/lazarus-br?hl=pt-BR> =============================================== ? ?* Conhe?a nosso canal IRC sobre Lazarus: #lazarus-br * ===============================================

Reply by email

Unknown author
to silvioprog: 2011/6/10 : I should leave it unchecked in (all) my package(s)? Silvio Cl?cio…
silvioprog wrote 9 lines
2011/6/10 : > It is not a bug. It is correct behaviour. > > The LazSolutionsRT should have the 'add to uses clause' flag not set: in the > package dialog, choose options. then > > 'Package options' - 'Usage' I should leave it unchecked in (all) my package(s)?

Usually, yes.
For IDE Design-time only packages, you can leave it on.

Michael.

Reply by email

Mattias Gaertner
to Unknown author
Show quoted text 16 lines
On Fri, 10 Jun 2011, silvioprog wrote: > 2011/6/10 : >> It is not a bug. It is correct behaviour. >> >> The LazSolutionsRT should have the 'add to uses clause' flag not set: in the >> package dialog, choose options. then >> >> 'Package options' - 'Usage' > > I should leave it unchecked in (all) my package(s)? Usually, yes. For IDE Design-time only packages, you can leave it on.

Packages installed in the IDE ignore the flag. The package unit is always added.

Maybe the default for new packages can be changed.

Mattias

Reply by email

Unknown author
to Mattias Gaertner
Mattias Gaertner wrote 24 lines
On Fri, 10 Jun 2011 17:06:12 +0200 (CEST) wrote: > > > On Fri, 10 Jun 2011, silvioprog wrote: > >> 2011/6/10 : >>> It is not a bug. It is correct behaviour. >>> >>> The LazSolutionsRT should have the 'add to uses clause' flag not set: in the >>> package dialog, choose options. then >>> >>> 'Package options' - 'Usage' >> >> I should leave it unchecked in (all) my package(s)? > > Usually, yes. > For IDE Design-time only packages, you can leave it on. Packages installed in the IDE ignore the flag. The package unit is always added. Maybe the default for new packages can be changed.

I think that would be a good idea.

Michael.

Reply by email

Mattias Gaertner
to Unknown author
Show quoted text 10 lines
[...] >> Usually, yes. >> For IDE Design-time only packages, you can leave it on. > > Packages installed in the IDE ignore the flag. The package unit is > always added. > > Maybe the default for new packages can be changed. I think that would be a good idea.

Done.

Mattias

Reply by email

silvioprog
to Unknown author: I think that would be a good idea. Michael.

2011/6/10 :

Show quoted text 25 lines
On Fri, 10 Jun 2011, Mattias Gaertner wrote: > On Fri, 10 Jun 2011 17:06:12 +0200 (CEST) > wrote: >> On Fri, 10 Jun 2011, silvioprog wrote: >>> 2011/6/10 ?: >>>> >>>> It is not a bug. It is correct behaviour. >>>> >>>> The LazSolutionsRT should have the 'add to uses clause' flag not set: >>>> in the >>>> package dialog, choose options. then >>>> >>>> 'Package options' - 'Usage' >>> >>> I should leave it unchecked in (all) my package(s)? >> >> Usually, yes. >> For IDE Design-time only packages, you can leave it on. > > Packages installed in the IDE ignore the flag. The package unit is > always added. > > Maybe the default for new packages can be changed. I think that would be a good idea.

+1.

Michael.
Silvio Cl?cio =============================================== Blog - <silvioprog.com.br> Twitter - <twitter.com/silvioprog> LazSolutions - <code.google.com/p/lazsolutions> Lazarus-BR - <groups.google.com.br/group/lazarus-br?hl=pt-BR> =============================================== ? ?* Conhe?a nosso canal IRC sobre Lazarus: #lazarus-br * ===============================================

Reply by email

silvioprog
to Unknown author: Usually, yes. For IDE Design-time only packages, you can leave it on. Michael.

2011/6/10 :

Show quoted text 13 lines
On Fri, 10 Jun 2011, silvioprog wrote: > 2011/6/10 ?: >> It is not a bug. It is correct behaviour. >> >> The LazSolutionsRT should have the 'add to uses clause' flag not set: in >> the >> package dialog, choose options. then >> >> 'Package options' - 'Usage' > > I should leave it unchecked in (all) my package(s)? Usually, yes. For IDE Design-time only packages, you can leave it on.

Solved in http://code.google.com/p/lazsolutions/source/detail?r=259.

Thx. :)

PS. Rafael, so, you reported about this thread on forum of Zeos?

Michael.
Silvio Cl?cio =============================================== Blog - <silvioprog.com.br> Twitter - <twitter.com/silvioprog> LazSolutions - <code.google.com/p/lazsolutions> Lazarus-BR - <groups.google.com.br/group/lazarus-br?hl=pt-BR> =============================================== ? ?* Conhe?a nosso canal IRC sobre Lazarus: #lazarus-br * ===============================================

Reply by email

ABorka
to Unknown author: It is not a bug. It is correct behaviour. The LazSolutionsRT should have the 'add to uses…
Show quoted text 32 lines
> I found the same bug in the LazSolutions, and i reported to the > developer, > who has answered me. > > http://code.google.com/p/lazsolutions/issues/detail?id=22 > > He said, that bug is a IDE bug. It is not a bug. It is correct behaviour. The LazSolutionsRT should have the 'add to uses clause' flag not set: in the package dialog, choose options. then 'Package options' - 'Usage' and then uncheck the 'Add package unit to uses section' (no check mark should be present). For Zeos, the same is probably true, but I do not know how the zeos package works. It can be that after this, the same error occurs. If so, it means that somewhere in the zeos code, the lazarus 'interfaces' unit is used, or a unit that depends on the LCL. This unit must be rewritten if you want to use zeos in a CGI or any webserver project. Michael.

I am not sure what is the problem in this case, but I am using Zeos for CGI applications since years without any issues.
Even gave the 7.0.0 Alpha version a try, though it does not handle the strings properly with FPC/Lazarus unlike the stable 6.6.6 release. With 7.0.0 alpha, sometimes just ?? comes back for string fields due to fpc/lazarus requiring UTF8 strings.

AB

Reply by email

Rafael Tuim Elias
to ABorka

When zcomponent or lazsolutionsrt declaration are removed, both works fine in CGI application.

The 2 following sites are made with FPWeb, Zeos and LazSolutions

www.yieldbetter.com.br

lazarus-cgi.co.cc

ps: i will report the problem in zeos bug traker.

Special thanks Michael, Matias, Silvio, ABorka

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

Reply by email