Raw Print mode difficulty

Issues and Discussions related to Harbour

Moderator: Rathinagiri

User avatar
hmgchang
Posts: 273
Joined: Tue Aug 13, 2013 4:46 am
Location: Indonesia

Raw Print mode difficulty

Post by hmgchang »

Dear Sirs,

I compile with HMG 3.1.2 for this program :


REQUEST HB_GT_WIN_DEFAULT
FUNCTION Main()
LOCAL cPrinterName
LOCAL aPrinter
cPrinterName := GETDEFAULTPRINTER()
PrintFileRaw( cPrinterName, "Pfr.prg")
wait
RETURN NIL

but had this errors :

build.log :
hbmk2: Warning: Non-portable output filename: '-opfr.exe'. Delete '.exe'
extension.
Harbour 3.2.0dev (r1303181903)
Copyright (c) 1999-2013, http://harbour-project.org/" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false;
C:/hmg.3.1.2/harbour/lib/win/mingw/libxhb.a(xhbprn.o):xhbprn.c:(.text+0x10): multiple definition of `HB_FUN_GETDEFAULTPRINTER'
C:/hmg.3.1.2/lib/libhmg.a(c_controlmisc.o):c_controlmisc.c:(.text+0x2d30): first defined here
collect2: ld returned 1 exit status
hbmk2: Error: Running linker. 1
gcc.exe C:/Users/Win732/AppData/Local/Temp/hbmk_e88dn0.dir/pfr.o C:/Users/Win732/AppData/Local/Temp/hbmk_e88dn0.dir/hbmk_oyxc0b.o D:/th/kuda/MYUTILS/PrintFileRaw/_temp.o -Wl,--nxcompat -Wl,--dynamicbase -mwindows -Wl,--start-group -lhmg -lcrypt -ledit -leditex -lgraph -lhfcl -lini -lreport -lmsvfw32 -lvfw32 -lhbct -lhbwin -lhbmzip -lminizip -lhbmemio -lhbmisc -lhbmysql -lmysql -lhbtip -lsqlite3 -lhbsqlit3 -lsddodbc -lrddsql -lsddmy -lhbodbc -lodbc32 -lhbhpdf -lhbfimage -lhbpgsql -lhbnetio -lxhb -lpng -llibhpdf -lhbvpdf -lhbextern -lhbdebug -lhbvm -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -lgtwin -lgtwvt -lgtgui -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon -lhbmainwin -lkernel32 -luser32 -lgdi32 -ladvapi32 -lws2_32 -lwinspool -lcomctl32 -lcomdlg32 -lshell32 -luuid -lole32 -loleaut32 -lmpr -lwinmm -lmapi32 -limm32 -lmsimg32 -lwininet -lhbpcre -lhbzlib -Wl,--end-group -opfr.exe -LC:/hmg.3.1.2/harbour/lib/win/mingw -LC:/hmg.3.1.2/lib

Pls advise some solution !

thks
hmgChang
Just Hmg It !
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: HMG 3.1.2

Post by esgici »

Hi hmgChang

You are welcome aboard :)

If we know your "human" name (instead of "nick-name") communication will be more warm and more productive ;)
I compile with HMG 3.1.2 for this program :
Why 3.12 ? We are using current version : 3.1.5; solving problem under different version may not be easy :(
Pls advise some solution !
With pleasure, if you give some additional information ;)

Probably you are using batch processing (build / compile.bat) for building your project (instead of HMG_IDE ) and/or your project path include space(s). Or there is some problems in your batch script ( build / compile.bat ).

Check and fix that points and if your problem persist please inform us about your working environment.

Happy HMG'ing :D
Viva INTERNATIONAL HMG :D
User avatar
danielmaximiliano
Posts: 2612
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: HMG 3.1.2

Post by danielmaximiliano »

Bienvenido / Welcome HMGCHAN :

como die el amigo Esgici, intente utilizar la ultima version de HMG (HMG.3.1.5 Test); si encuentra algun error o necesita alguna ayuda solo coloque un nuevo topico.

desde Buenos Aires Argentina.

as says the friend Esgici, try using the latest version of HMG (HMG.3.1.5 test), if you find any error or need any help just put in a new topic.

from Buenos Aires Argentina.
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Re: HMG 3.1.2

Post by Pablo César »

hmgchang wrote:I compile with HMG 3.1.2 for this program :

Code: Select all

REQUEST HB_GT_WIN_DEFAULT

FUNCTION Main()
  LOCAL cPrinterName
  LOCAL aPrinter

  cPrinterName := GETDEFAULTPRINTER()
  PrintFileRaw( cPrinterName, "Pfr.prg")
  wait
  RETURN NIL
Hi Chang, welcome to the forum! :)

Please note PrintFileRaw is not longer for Harbour, this was noticed in ChangeLog since 2009 by Viktor Szakats.

So replace PrintFileRaw by WIN_PRINTFILERAW in your source code, then it will work !

By any conflict reason, regardless of the HMG version when is used PrintFileRaw it is coming an error while compiling. But as all colleagues already said is better to use the last version of HMG UNICODE by more stable reasons and more ressources. ;)
Error message wrote:C:/hmg.3.1.5/harbour/lib/win/mingw/libxhb.a(xhbprn.o):xhbprn.c:(.text+0x10): multiple definition of `HB_FUN_GETDEFAULTPRINTER'
Probably this error happen, because HMG recognize PrintFileRaw as xHB function and then duplicated in its linking...
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
hmgchang
Posts: 273
Joined: Tue Aug 13, 2013 4:46 am
Location: Indonesia

Raw Print mode difficulty - 2

Post by hmgchang »

Hi All Masters, :)

I am very sorry for my mistakes not knowing your replies !
I dont really know how to get around the forum and confused.
I just came to know I get replies for my problem today ( 02Sept2013)
Many thks !

I join the hmgforum by email : tanikchong@yahoo.com too.
My name is : IkChong or IkChang, sorry to use hmgChang but I dont know how to change it now ! pls suggest !

I read quite alot about HMG but still always get confused by many things ! and lots of questions too !
Any idea I can download this forum for offline view.

I do Clipper for very small stock control.

Anyway... I do love HMG and thanks to all of you...
Just Hmg It !
User avatar
hmgchang
Posts: 273
Joined: Tue Aug 13, 2013 4:46 am
Location: Indonesia

Re: HMG 3.1.2

Post by hmgchang »

Dear Pablo,
Thks for the info, it solved my problem... but still not able to print to pure USB printer...
it stays in the queue but not printing ... but it do print when I tried :

cCmd := "NOTEPAD /P test.txt"
RUN ( cCmd)

Mr. Esgici... now I am using hmg.3.1.5... thks !
Just Hmg It !
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: HMG 3.1.2

Post by Rathinagiri »

Regarding USB printer, had it been installed as a Windows printer?

Regarding your username, do you really want to change your username?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: HMG 3.1.2

Post by esgici »

Hi IkChong

You don't need change your username;

It's enough we learned your name :)

Happy HMG'ing :D
Viva INTERNATIONAL HMG :D
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Raw Print mode difficulty - 3

Post by Pablo César »

hmgchang wrote:My name is : IkChong or IkChang, sorry to use hmgChang but I dont know how to change it now ! pls suggest !
Hi IkChong ! This is a personal matter, but if you want to change your nick-name, your name would be too good.
I read quite alot about HMG but still always get confused by many things ! and lots of questions too !
My advise for you is to open new threads for each question to be different. So do not mix the issues, help us to keep the forum more organized and easier to locate messages in the future. Your questions may be the same doubts of many friends for both this present and the future too.
Any idea I can download this forum for offline view.
All depends what are your intentions. If you want to learn GUI programming, I suggest to compile and study each examples which are in your computer already when you have installed HMG. You will find a SAMPLES folder. All these when compiled a visualize the source code you will see how to make for each cases. Very important.
I do Clipper for very small stock control.
Even been Clipper, here we also can see most of troubles found in Clipper. Because most of us are coming from this programming tool.
Please open a new topic for your case. Let us know more details:

- As Rathinagiri asked, is this printer duly installed by convetional way at you Windows ?
- Which version of your Windows
- You said was solved with my indication, but you did not mentioned if you are using WIN_PRINTFILERAW
- Supposing when you send by WIN_PRINTFILERAW, can you see in the Printer jobs if the package was sent to the printer ?
Image
- Which model of printer is ?
- Do you create a file for printing and you duly close it ? (Would be interesting to see how you do, pls show us your code).

How to give a shot in the dark... I can indicated to uninstall this printer and install again.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
Jairo Maia
Posts: 53
Joined: Sun Jul 17, 2011 1:47 pm
Location: Campinas - SP - Brazil

Re: HMG 3.1.2

Post by Jairo Maia »

Hello to All,

This occurs because the printer doesn't have support for RAW mode. Isn´t possible to print using Win_PrintFileRaw() function in printers that no support the RAW mode, or if it is disabled.

Regards.
Post Reply