On Mac OS X, if Printer4Lazarus is added to the project, it fails to compile and throws an error at the top of cupsprinters.inc. The error is "Illegal Expression". I'm using the 11/05 over night build.
Dominique.

Mailing lists / lazarus / 2008-05
11 messages · 5 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
On Mac OS X, if Printer4Lazarus is added to the project, it fails to compile and throws an error at the top of cupsprinters.inc. The error is "Illegal Expression". I'm using the 11/05 over night build.
Dominique.
On Mac OS X, if Printer4Lazarus is added to the project, it fails to compile and throws an error at the top of cupsprinters.inc. The error is "Illegal Expression". I'm using the 11/05 over night build.
I can confirm this with today svn update. This command
simba:laz-9.25 bee$ make all LCL_PLATFORM=carbon OPT="-k-framework -kcarbon -k-framework -kOpenGL -k'-dylib_file'
-k'/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib -k/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib'" bigide
gave me
Free Pascal Compiler version 2.3.1 [2008/05/13] for i386 Copyright (c) 1993-2008 by Florian Klaempfl
Target OS: Darwin for i386
Compiling runtimetypeinfocontrols.pas
Assembling runtimetypeinfocontrols
22 lines compiled, 0.4 sec
make -C printers
/bin/rm -f lib/i386-darwin/carbon/printer4lazarus.ppu /usr/local/bin/ppc386 -dUseCache -dNativePrint -dLCL -dLCLcarbon -S2 -gl -Fuunix/ -Fuwin32/ -Fucarbon/ -Fuqt/
-Fu/usr/local/share/lazarus/lcl/units/i386-darwin/ -Fu/usr/local/share/lazarus/lcl/units/i386-darwin/carbon/ -Fu/usr/local/share/lazarus/packager/units/i386-darwin/ -Fu./ -Fu/usr/local/lib/fpc/2.3.1/units/i386-darwin/rtl -Fiunix/ -Fiwin32/ -Ficarbon/ -Fiqt/ -Fi./ -FE. -FUlib/i386-darwin/carbon -k-framework -kcarbon -k-framework -kOpenGL -k'-dylib_file'
-k'/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib -k/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib' -di386 printer4lazarus.pas
Free Pascal Compiler version 2.3.1 [2008/05/13] for i386 Copyright (c) 1993-2008 by Florian Klaempfl
Target OS: Darwin for i386
Compiling printer4lazarus.pas
Compiling printersdlgs.pp
Compiling osprinters.pas
cupsprinters.inc(4,1) Error: Illegal expression
cupsprinters.inc(4,6) Fatal: Syntax error, ";" expected but "identifier UDLGSELECTPRINTER" found
Fatal: Compilation aborted
make[2]: *** [printer4lazarus.ppu] Error 1
make[1]: *** [bigidecomponents] Error 2
make: *** [bigidecomponents] Error 2
I couldn't resolve the errors since the line number info seems to be inaccurate. Line 4,1 of cupsprinters.inc is a comment block and there's no UDLGSELECTPRINTER on line 4,6.
Removing 'bigide' param gave me a working Lazarus with minimum component set. I'm using FPC 2.3.1 and Laz 9.25 from svn.
-Bee-
has Bee.ography at:
http://beeography.wordpress.com
I'm still seeing this in 13/5 overnight build.
I'm still seeing this in 13/5 overnight build.
Are you sure, that your lazarus svn is up2date?
1. Line 4,1 of cupsprinters.inc is *not* a comment block and there *is* a UDLGSELECTPRINTER on line 4,6.
2. Because of -dNativePrint -dLCL -dLCLcarbon, it should not use cupsprinters.inc, but carbonprinters.inc.
Please compile with -vut or even with -va and check what the compiler is doing.
Mattias
I'm still seeing this in 13/5 overnight build.
You could use subversion instead of snapshots and find the revision which caused the problem, as described here:
http://wiki.lazarus.freepascal.org/How_To_Help_Developing_Lazarus#Dealing_with_regressions
On Tue, 13 May 2008 23:02:54 +0100 Are you sure, that your lazarus svn is up2date? 1.…
Sorry I mean the overnight snapshot build on over @ http://www.hu.freepascal.org/lazarus/
I will try and compile my projec with -dNativePrint to see if that makes any difference.
Dominique.
On Tue, 13 May 2008 23:02:54 +0100 Are you sure, that your lazarus svn is up2date? 1.…
I just update my FPC and Lazarus SVN and make sure it got all the new updates. Recompile FPC, it did well. Recompile lazarus with bigide param, the problem still persists.
1. Line 4,1 of cupsprinters.inc is *not* a comment block and there *is* a UDLGSELECTPRINTER on line 4,6.
Correct. It seemed that I opened a wrong file. Sorry, my mistake. :)
2. Because of -dNativePrint -dLCL -dLCLcarbon, it should not use cupsprinters.inc, but carbonprinters.inc.
Using...
make all LCL_PLATFORM=carbon OPT="-k-framework -kcarbon -k-framework -kOpenGL -k'-dylib_file'
-k'/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib :/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib' -dNativePrint -va" bigide
I got this...
[1.311] Back in osprinters.pas
[1.311] ENDIF NATIVEPRINT found
[1.311] ENDIF LCLCARBON found
[1.311] IFDEF LCLQT found, rejected
[1.311] Skipping until...
[1.311] Handling switch "$ELSE"
[1.311] ELSE LCLQT found, accepted
[1.311] Handling switch "$I"
[1.311] Searching file cupsprinters.inc... not found [1.311] Searching file CUPSPRINTERS.INC... not found [1.311] Searching file cupsprinters.inc... not found [1.311] Searching file CUPSPRINTERS.INC... not found [1.311] Searching file ./unix/cupsprinters.inc... found [1.311] Searching file ./unix/cupsprinters.inc... found [1.311] Start reading includefile ./unix/cupsprinters.inc [1.311] Illegal expression
[1.311] Syntax error, ";" expected but "identifier UDLGSELECTPRINTER" found [1.312] ENDIF LCLQT found
[1.312] ENDIF UNIX found
[1.312] Searching file printersdlgs.pp... found
[1.401] Compilation aborted
Obviously the compiler locates for cupsprinters.inc instead of carbonprinters.inc
Did I do something wrong? TIA.
-Bee-
has Bee.ography at:
http://beeography.wordpress.com
Yes. You are recompiling a printers package outside IDE. Thats why LCLCarbon is undefined. Add -dLCLCarbon to your params to overcome this problem.
Best regards,
Paul Ishenin.
The makefiles already add all options. See prior mails.
The osprinters.pas was wrong for carbon. I fixed it in r15128.
Please test.
Mattias
The makefiles already add all options. See prior mails. The osprinters.pas was wrong for carbon. I fixed it in r15128.
make all LCL_PLATFORM=carbon OPT="-k-framework -kcarbon -k-framework -kOpenGL -k'-dylib_file'
-k'/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib :/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib' -dNativePrint -dLCL -dLCLCarbon" bigide
is simply didn't work. I had to add several source paths manually to some carbon's units, then it went well. As far as I remember, I never need to add additional search path on linux with gtk2. Simply "make all LCL_PLATFORM=gtk2 bigide" just works. ;) Maybe this is a problem with the make file which I don't understand. :-D
Those paths that needed to be added are:
-Fucomponents/printers/carbon/
-Fucomponents/printers/
-Ficomponents/printers/carbon/
-Fulcl/interfaces/carbon/
-Fucomponents/rtticontrols/
-Fucomponents/printers/design/
Now I have richer component palette. Thank you. :)
-Bee-
has Bee.ography at:
http://beeography.wordpress.com
Now I have richer component palette. Thank you. :)
However, printing feature still didn't work. Both IDE's printing feature and LCL's printing components.
-Bee-
has Bee.ography at:
http://beeography.wordpress.com