Re: [Harbour] hbwin.lib error
On Tue, 26 Jan 2010, Szak�ts Viktor wrote: Hi, > I'll commit the separation ASAP, to clear that part up. Thank you. best regards, Przemek ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] hbwin.lib error
I'll commit the separation ASAP, to clear that part up. Brgds, Viktor On 2010 Jan 26, at 16:53, Przemysław Czerpak wrote: > On Tue, 26 Jan 2010, Xavi wrote: > > Hi, > >>> Now everyone who use WIN_PRN class has to link his code >>> with PNG library even if it's unnecessary. >> PNG library is used in win_BitMapDimensions, now is not used >> in WIN_PRN class to print win_BMPs class. > > It is because it's in the same file as other functions used by > WIN_BMP class and WIN_BMP class is used by WIN_PRN. Just simply > try to link this code without png library: > > proc main() > win_prn() > return > > Anyhow moving WIN_BITMAPDIMENSIONS() to separate file is also good > idea. It would resolve current dependency problem. Anyhow if you > want to use above function in WIN_BMP class then we still need > some type of startup initialization controlled by REQUEST mechanism. > >> Note that now it's a RAW implementation driver dependent and some >> drivers don't need the original dimensions to work. >> Unfortunately the PNG support is few used in win drivers. >> win_BitMapDimensions works fine and can be nice changed win_BMP class >> with attache sample prg. >> Perhaps in future, we can change it to not RAW driver dependent and >> convert these formats into DIB plane but now, I don't know how do it >> and if this is correct. >> What do you think about? > > It's good idea but it would be very nice to keep it modular. > We can try to use startup initialization or we can define separate > classes with common interface i.e. HB_PNG which can be accepted by > WIN_PRN just like WIN_BMP. > > best regards, > Przemek > ___ > Harbour mailing list (attachment size limit: 40KB) > Harbour@harbour-project.org > http://lists.harbour-project.org/mailman/listinfo/harbour ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] hbwin.lib error
Hi Xavi (and also Przemek), On 2010 Jan 26, at 16:32, Xavi wrote: >> Now everyone who use WIN_PRN class has to link his code >> with PNG library even if it's unnecessary. > > PNG library is used in win_BitMapDimensions, now is not used in WIN_PRN class > to print win_BMPs class. > Note that now it's a RAW implementation driver dependent and some drivers > don't need the original dimensions to work. > Unfortunately the PNG support is few used in win drivers. > win_BitMapDimensions works fine and can be nice changed win_BMP class with > attache sample prg. > Perhaps in future, we can change it to not RAW driver dependent and convert > these formats into DIB plane but now, I don't know how do it and if this is > correct. > What do you think about? The BMP class modifications are all good, but the WIN_BMP() separation would not by itself solve the libpng dependency, since WIN_DRAWBITMAP() is still used from WIN_PRN(), and this function resides in the same file where PNG dependent stuff is. Plus even we separate those two, the libpng dependency stays to be a problem for everyone using WIN_BMP(), and since everyone likes to print logos, I'd guess many (if not most) users would end up needed libpng anyway. For me BTW, libpng dependency isn't such a huge problem, and creating such dependencies is sooner or later inevitable, which means on the longer term it cannot be avoided with tricks anyway. What is important IMO is to solve such dependency so that it works on all supported platforms and environments, and in this case I think the problem part could cross-builds. I hope someone can test it. For pure Windows users it's as easy as adding libpng to the liblist or using hbwin.hbc as I told previously. We're in trunk so such changes are acceptable, and users following development should adapt now, final users can adapt on next release. After all .png printing is quite an important feature these days. As for converting PNG/JPEG to DIB, I absolutely agree. It just have to be written. For JPEG support we will need to include it in /external, and if there is no objection I can do it even now, I have it ready locally since quite some time now, just upgraded to v8 days ago. Brgds, Viktor ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] hbwin.lib error
On Tue, 26 Jan 2010, Xavi wrote: Hi, > >Now everyone who use WIN_PRN class has to link his code > >with PNG library even if it's unnecessary. > PNG library is used in win_BitMapDimensions, now is not used > in WIN_PRN class to print win_BMPs class. It is because it's in the same file as other functions used by WIN_BMP class and WIN_BMP class is used by WIN_PRN. Just simply try to link this code without png library: proc main() win_prn() return Anyhow moving WIN_BITMAPDIMENSIONS() to separate file is also good idea. It would resolve current dependency problem. Anyhow if you want to use above function in WIN_BMP class then we still need some type of startup initialization controlled by REQUEST mechanism. > Note that now it's a RAW implementation driver dependent and some > drivers don't need the original dimensions to work. > Unfortunately the PNG support is few used in win drivers. > win_BitMapDimensions works fine and can be nice changed win_BMP class > with attache sample prg. > Perhaps in future, we can change it to not RAW driver dependent and > convert these formats into DIB plane but now, I don't know how do it > and if this is correct. > What do you think about? It's good idea but it would be very nice to keep it modular. We can try to use startup initialization or we can define separate classes with common interface i.e. HB_PNG which can be accepted by WIN_PRN just like WIN_BMP. best regards, Przemek ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] hbwin.lib error
Hi, Now everyone who use WIN_PRN class has to link his code with PNG library even if it's unnecessary. PNG library is used in win_BitMapDimensions, now is not used in WIN_PRN class to print win_BMPs class. Note that now it's a RAW implementation driver dependent and some drivers don't need the original dimensions to work. Unfortunately the PNG support is few used in win drivers. win_BitMapDimensions works fine and can be nice changed win_BMP class with attache sample prg. Perhaps in future, we can change it to not RAW driver dependent and convert these formats into DIB plane but now, I don't know how do it and if this is correct. What do you think about? Best regards, Xavi CREATE CLASS WIN_BMP EXPORTED: METHOD New() METHOD LoadFile( cFileName, aDimXY ) METHOD Create() METHOD Destroy() METHOD IsSupported( oPrn, nError ) METHOD Draw( oPrn, aRectangle, nError ) VAR Type INIT 0 // Type BitMap: 1 == BM, 2 == JPEG, 3 == PNG VAR DimXYINIT { 0, 0 } // Image Dimensions X Y pixels VAR Rect INIT { 0, 0, 0, 0 } // Coordinates to print BitMap // XDest,// x-coord of destination upper-left corner // YDest,// y-coord of destination upper-left corner // nDestWidth, // width of destination rectangle // nDestHeight, // height of destination rectangle // See WinApi StretchDIBits() VAR BitMap INIT "" VAR FileName INIT "" ENDCLASS METHOD New() CLASS WIN_BMP RETURN Self METHOD LoadFile( cFileName, aDimXY ) CLASS WIN_BMP ::FileName := cFileName ::Bitmap := win_LoadBitMapFile( ::FileName ) IF Empty( ::Bitmap ) ::Type := 0 ::DimXY := { 0, 0 } ELSE ::Type := win_bitmapType( ::Bitmap ) IF ISARRAY( aDimXY ) ::DimXY := aDimXY ELSEIF ! win_BitMapDimensions( ::Bitmap, @::DimXY[1], @::DimXY[2] ) ::DimXY := { 1, 1 } // Driver may use the original dimensions ENDIF ENDIF RETURN ::Type != HB_WIN_BITMAP_UNKNOWN METHOD Create() CLASS WIN_BMP // Compatibility function for Alaska Xbase++ RETURN Self METHOD Destroy() CLASS WIN_BMP // Compatibility function for Alaska Xbase++ RETURN NIL METHOD IsSupported( oPrn, nError ) CLASS WIN_BMP RETURN ( nError := win_BitmapIsSupported( oPrn:hPrinterDc, ::Bitmap ) ) == 0 METHOD Draw( oPrn, aRectangle, nError ) CLASS WIN_BMP // Pass a WIN_PRN object reference & Rectangle array IF ISARRAY( aRectangle ) ::Rect := aRectangle ENDIF RETURN IIF( ::IsSupported( oPrn, @nError ), oPrn:DrawBitMap( Self ), .F. ) ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] hbwin.lib error
>>> I think this should be modified to use REQUEST mechanism, i.e. >>> REQUEST HB_PNG >>> Now everyone who use WIN_PRN class has to link his code >>> with PNG library even if it's unnecessary. >> I can't oversee this solution, but if it >> helps us to loosen this dependency, you're >> probably right. > > We can make it just like for PCRE library by registering > the function in init code. I can implement it. It would be very nice. Brgds, Viktor ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] hbwin.lib error
On Tue, 26 Jan 2010, Szak�ts Viktor wrote: Hi, > > I think this should be modified to use REQUEST mechanism, i.e. > > REQUEST HB_PNG > > Now everyone who use WIN_PRN class has to link his code > > with PNG library even if it's unnecessary. > I can't oversee this solution, but if it > helps us to loosen this dependency, you're > probably right. We can make it just like for PCRE library by registering the function in init code. I can implement it. best regards, Przemek ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] hbwin.lib error
Hi, >> Either use hbwin.hbc to link in hbwin module. Or add >> libpng lib to the liblist manually. (first option strong >> preferred, to avoid any similar problems in the future) >> Also see: >> contrib\hbwin\hbwin.hbc > > I think this should be modified to use REQUEST mechanism, i.e. > REQUEST HB_PNG > Now everyone who use WIN_PRN class has to link his code > with PNG library even if it's unnecessary. I can't oversee this solution, but if it helps us to loosen this dependency, you're probably right. Brgds, Viktor ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] hbwin.lib error
On Tue, 26 Jan 2010, Szak�ts Viktor wrote: Hi, > Either use hbwin.hbc to link in hbwin module. Or add > libpng lib to the liblist manually. (first option strong > preferred, to avoid any similar problems in the future) > Also see: >contrib\hbwin\hbwin.hbc I think this should be modified to use REQUEST mechanism, i.e. REQUEST HB_PNG Now everyone who use WIN_PRN class has to link his code with PNG library even if it's unnecessary. best regards, Przemek ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] hbwin.lib error
Hi Itamar, Either use hbwin.hbc to link in hbwin module. Or add libpng lib to the liblist manually. (first option strong preferred, to avoid any similar problems in the future) Also see: contrib\hbwin\hbwin.hbc Brgds, Viktor On 2010 Jan 26, at 01:03, Itamar Lins wrote: > Hi! > See this: > * $Id: ChangeLog 13709 2010-01-25 20:24:23Z vouchcac $ > > hbmk2: Processando arquivo de configura?Æo: D:\DEV\HARBOUR\BIN\hbmk.cfg > hbmk2: Linkando... farol.exe > hbwin.lib(win_bmp.obj) : error LNK2019: unresolved external symbol > _png_get_io_ptr referenced in function "void __cdecl hb_png_read_func(struct > png_struct_def *,unsigned char *,unsigned int)" > (?hb_png_read_func@@YAXPAUpng_struct_def@@p...@z) > hbwin.lib(win_bmp.obj) : error LNK2019: unresolved external symbol > _png_get_IHDR referenced in function "int __cdecl hb_png_get_param(unsigned > char const *,unsigned long,int *,int *,int *,int *)" > (?hb_png_get_param@@yahpbekpah...@z) > hbwin.lib(win_bmp.obj) : error LNK2019: unresolved external symbol > _png_read_info referenced in function "int __cdecl hb_png_get_param(unsigned > char const *,unsigned long,int *,int *,int *,int *)" > (?hb_png_get_param@@yahpbekpah...@z) > hbwin.lib(win_bmp.obj) : error LNK2019: unresolved external symbol > _png_set_read_fn referenced in function "int __cdecl > hb_png_get_param(unsigned char const *,unsigned long,int *,int *,int *,int > *)" (?hb_png_get_param@@yahpbekpah...@z) > hbwin.lib(win_bmp.obj) : error LNK2019: unresolved external symbol > _png_set_sig_bytes referenced in function "int __cdecl > hb_png_get_param(unsigned char const *,unsigned long,int *,int *,int *,int > *)" (?hb_png_get_param@@yahpbekpah...@z) > hbwin.lib(win_bmp.obj) : error LNK2019: unresolved external symbol > _png_destroy_read_struct referenced in function "int __cdecl > hb_png_get_param(unsigned char const *,unsigned long,int *,int *,int *,int > *)" (?hb_png_get_param@@yahpbekpah...@z) > hbwin.lib(win_bmp.obj) : error LNK2019: unresolved external symbol > _png_create_info_struct referenced in function "int __cdecl > hb_png_get_param(unsigned char const *,unsigned long,int *,int *,int *,int > *)" (?hb_png_get_param@@yahpbekpah...@z) > hbwin.lib(win_bmp.obj) : error LNK2019: unresolved external symbol > _png_create_read_struct referenced in function "int __cdecl > hb_png_get_param(unsigned char const *,unsigned long,int *,int *,int *,int > *)" (?hb_png_get_param@@yahpbekpah...@z) > hbwin.lib(win_bmp.obj) : error LNK2019: unresolved external symbol > _png_sig_cmp referenced in function "int __cdecl hb_png_get_param(unsigned > char const *,unsigned long,int *,int *,int *,int *)" > (?hb_png_get_param@@yahpbekpah...@z) > > MSVC express, XP SP3 > > Best regards, > Itamar M. Lins Jr. > > > > ___ > Harbour mailing list (attachment size limit: 40KB) > Harbour@harbour-project.org > http://lists.harbour-project.org/mailman/listinfo/harbour ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
[Harbour] hbwin.lib error
Hi! See this: * $Id: ChangeLog 13709 2010-01-25 20:24:23Z vouchcac $ hbmk2: Processando arquivo de configura?Æo: D:\DEV\HARBOUR\BIN\hbmk.cfg hbmk2: Linkando... farol.exe hbwin.lib(win_bmp.obj) : error LNK2019: unresolved external symbol _png_get_io_ptr referenced in function "void __cdecl hb_png_read_func(struct png_struct_def *,unsigned char *,unsigned int)" (?hb_png_read_func@@YAXPAUpng_struct_def@@p...@z) hbwin.lib(win_bmp.obj) : error LNK2019: unresolved external symbol _png_get_IHDR referenced in function "int __cdecl hb_png_get_param(unsigned char const *,unsigned long,int *,int *,int *,int *)" (?hb_png_get_param@@yahpbekpah...@z) hbwin.lib(win_bmp.obj) : error LNK2019: unresolved external symbol _png_read_info referenced in function "int __cdecl hb_png_get_param(unsigned char const *,unsigned long,int *,int *,int *,int *)" (?hb_png_get_param@@yahpbekpah...@z) hbwin.lib(win_bmp.obj) : error LNK2019: unresolved external symbol _png_set_read_fn referenced in function "int __cdecl hb_png_get_param(unsigned char const *,unsigned long,int *,int *,int *,int *)" (?hb_png_get_param@@yahpbekpah...@z) hbwin.lib(win_bmp.obj) : error LNK2019: unresolved external symbol _png_set_sig_bytes referenced in function "int __cdecl hb_png_get_param(unsigned char const *,unsigned long,int *,int *,int *,int *)" (?hb_png_get_param@@yahpbekpah...@z) hbwin.lib(win_bmp.obj) : error LNK2019: unresolved external symbol _png_destroy_read_struct referenced in function "int __cdecl hb_png_get_param(unsigned char const *,unsigned long,int *,int *,int *,int *)" (?hb_png_get_param@@yahpbekpah...@z) hbwin.lib(win_bmp.obj) : error LNK2019: unresolved external symbol _png_create_info_struct referenced in function "int __cdecl hb_png_get_param(unsigned char const *,unsigned long,int *,int *,int *,int *)" (?hb_png_get_param@@yahpbekpah...@z) hbwin.lib(win_bmp.obj) : error LNK2019: unresolved external symbol _png_create_read_struct referenced in function "int __cdecl hb_png_get_param(unsigned char const *,unsigned long,int *,int *,int *,int *)" (?hb_png_get_param@@yahpbekpah...@z) hbwin.lib(win_bmp.obj) : error LNK2019: unresolved external symbol _png_sig_cmp referenced in function "int __cdecl hb_png_get_param(unsigned char const *,unsigned long,int *,int *,int *,int *)" (?hb_png_get_param@@yahpbekpah...@z) MSVC express, XP SP3 Best regards, Itamar M. Lins Jr. ___ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour