HMG4 harbour compiler option

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

HMG4 harbour compiler option

Post by l3whmg »

Hi guys,
I come back on HMG4.
I seem to remember that the compilation of HMG4 library (normally for all the programs), I have to use the option /w3.
I wrote a simple program and I have compiled with this option, but I receive these warnings:
pgmp000.prg(23) Warning W0001 Ambiguous reference 'OPRIORTAB'
pgmp000.prg(23) Warning W0001 Ambiguous reference 'OCURRENTPAGE'
pgmp000.prg(23) Warning W0001 Ambiguous reference 'OPRIORPAGE'
pgmp000.prg(23) Warning W0001 Ambiguous reference 'P000WIN'
pgmp000.prg(23) Warning W0001 Ambiguous reference 'P000WIN'
pgmp000.prg(23) Warning W0001 Ambiguous reference 'OCURRENTWINDOW'
pgmp000.prg(36) Warning W0001 Ambiguous reference 'OMAINMENU'
pgmp000.prg(38) Warning W0001 Ambiguous reference 'OMAINMENU'
pgmp000.prg(46) Warning W0001 Ambiguous reference 'P000WIN'
pgmp000.prg(55) Warning W0001 Ambiguous reference 'P000WIN'
pgmp000.prg(71) Warning W0001 Ambiguous reference 'P000WIN'
This is the piece of code
Line 23: DEFINE WINDOW p000Win
Line 24: ROW 0
Line 25: COL 0
Line 26: WIDTH 860
Line 27: HEIGHT 645
Line 28: TITLE "Main form"
Line 29: TYPE WND_MAIN
Line 30: ONINIT Win_OnInit()
Line 31: ONINTERACTIVECLOSE Win_OnInteractiveClose()
Line 32: ONRELEASE Win_OnRelease()
Line 33: FONTNAME "Arial"
Line 34: FONTSIZE 10
Line 35:
Line 36: DEFINE MAIN MENU
Line 37:
Line 38: DEFINE POPUP "&File"
Line 39: MENUITEM "e&Xit" ACTION p000_Exit()
Line 40: END POPUP
Line 41:
Line 42: END MENU
Line 43:
Line 44: END WINDOW
Line 45:
Line 46: p000Win:Activate()
Line 47:
Line 48:RETURN NIL
......
Line 55: p000Win:Center()
......
Line 71: p000Win:Release()
Line 55 and Line 71 are included in STATIC FUNCTIONS

Where is my mistake?
If I use /w0 everything work fine.

Cheers
Luigi from Italy
www.L3W.it
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: HMG4 harbour compiler option

Post by Rathinagiri »

Can you post the full code.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: HMG4 harbour compiler option

Post by l3whmg »

Hi Rathinagiri,
Now I have a big problem: I can't build anything :roll:

I need to clarify some things.
1) I've downloaded HMG4 distribution pack
2) I've downloaded from svn the tar file and put over prior installation
3) I've modified path in buildlib.bat in according with my structure (D:\Hmg4\Hmg it's my main dir)
4) I recreate hmg library

A) I've installed Harbour in D:\Hmg4\Harbour NOTE: it's different from Hmg4 distribution pack
B) I've installed MinGw in D:\Hmg4\MinGw NOTE: it's different from Hmg4 distribution pack
C) I try to compile my program with a mynbuild.bat and now I receive this
Harbour 2.1.0rc1 (Rev. 16112)
Copyright (c) 1999-2011, http://harbour-project.org/
Compiling 'pgmp000.prg'...
Lines 3120, Functions/Procedures 6
Generating C source output to 'C:\DOCUME~1\luigi\IMPOST~1\Temp\hbmk_wtw4nf.dir\pgmp000.c'... Done.
Compiling 'l3w_xsystem.prg'...

Lines 3132, Functions/Procedures 1
Generating C source output to 'C:\DOCUME~1\luigi\IMPOST~1\Temp\hbmk_wtw4nf.dir\l3w_xsystem.c'... Done.
C:/DOCUME~1/luigi/IMPOST~1/Temp/hbmk_wtw4nf.dir/pgmp000.o:pgmp000.c:(.data+0x38): undefined reference to `HB_FUN_HBQT_ERRORSYS'
D:/HMG4/Hmg/Svn/lib/libhmg.a(window.o):window.c:(.data+0x818): undefined reference to `HB_FUN_QCURSOR'
D:/HMG4/Hmg/Svn/lib/libhmg.a(window.o):window.c:(.data+0x828): undefined reference to `HB_FUN_QBITMAP'
D:/HMG4/Hmg/Svn/lib/libhmg.a(window.o):window.c:(.data+0xa78): undefined reference to `HB_FUN_NTOC'
D:/HMG4/Hmg/Svn/lib/libhmg.a(window.o):window.c:(.data+0xfe8): undefined reference to `HB_FUN_QAPPLICATION'
D:/HMG4/Hmg/Svn/lib/libhmg.a(window.o):window.c:(.data+0x1028): undefined reference to `HB_FUN_QMAINWINDOW'
D:/HMG4/Hmg/Svn/lib/libhmg.a(window.o):window.c:(.data+0x10d8): undefined reference to `HB_FUN_QFONT'
D:/HMG4/Hmg/Svn/lib/libhmg.a(window.o):window.c:(.data+0x10f8): undefined reference to `HB_FUN_QLABEL'
D:/HMG4/Hmg/Svn/lib/libhmg.a(window.o):window.c:(.data+0x1138): undefined reference to `HB_FUN_QMENU'
D:/HMG4/Hmg/Svn/lib/libhmg.a(window.o):window.c:(.data+0x1238): undefined reference to `HB_FUN_QSPLITTER'
D:/HMG4/Hmg/Svn/lib/libhmg.a(window.o):window.c:(.data+0x1308): undefined reference to `HB_FUN_QSYSTEMTRAYICON'
D:/HMG4/Hmg/Svn/lib/libhmg.a(window.o):window.c:(.data+0x1388): undefined reference to `HB_FUN_QPOINTFROMPOINTER'
D:/HMG4/Hmg/Svn/lib/libhmg.a(window.o):window.c:(.data+0x1488): undefined reference to `HB_FUN_QEVENTLOOP'
D:/HMG4/Hmg/Svn/lib/libhmg.a(window.o):window.c:(.data+0x14d8): undefined reference to `HB_FUN_QPIXMAP'
D:/HMG4/Hmg/Svn/lib/libhmg.a(window.o):window.c:(.data+0x14f8): undefined reference to `HB_FUN_QPAINTER'
D:/HMG4/Hmg/Svn/lib/libhmg.a(window.o):window.c:(.data+0x1518): undefined reference to `HB_FUN_QPEN'
D:/HMG4/Hmg/Svn/lib/libhmg.a(window.o):window.c:(.data+0x1538): undefined reference to `HB_FUN_QCOLOR'
D:/HMG4/Hmg/Svn/lib/libhmg.a(window.o):window.c:(.data+0x1578): undefined reference to `HB_FUN_QBRUSH'
D:/HMG4/Hmg/Svn/lib/libhmg.a(window.o):window.c:(.data+0x15a8): undefined reference to `HB_FUN_QRECTF'
D:/HMG4/Hmg/Svn/lib/libhmg.a(window.o):window.c:(.data+0x1608): undefined reference to `HB_FUN_QPOINTF'
D:/HMG4/Hmg/Svn/lib/libhmg.a(window.o):window.c:(.data+0x1618): undefined reference to `HB_FUN_QPAINTERPATH'
D:/HMG4/Hmg/Svn/lib/libhmg.a(window.o):window.c:(.data+0x16a8): undefined reference to `HB_FUN_QTEXTOPTION'
D:/HMG4/Hmg/Svn/lib/libhmg.a(window.o):window.c:(.data+0x16f8): undefined reference to `HB_FUN_QMOUSEEVENTFROMPOINTER'
D:/HMG4/Hmg/Svn/lib/libhmg.a(window.o):window.c:(.data+0x1728): undefined reference to `HB_FUN_QKEYEVENTFROMPOINTER'
D:/HMG4/Hmg/Svn/lib/libhmg.a(window.o):window.c:(.data+0x17a8): undefined reference to `HB_FUN_QREGION'
D:/HMG4/Hmg/Svn/lib/libhmg.a(misc.o):misc.c:(.data+0x58): undefined reference to `HB_FUN_QDESKTOPWIDGET'
D:/HMG4/Hmg/Svn/lib/libhmg.a(misc.o):misc.c:(.data+0xd8): undefined reference to `HB_FUN_QDESKTOPSERVICES'
D:/HMG4/Hmg/Svn/lib/libhmg.a(mainmenu.o):mainmenu.c:(.data+0x168): undefined reference to `HB_FUN_QMENUBAR'
D:/HMG4/Hmg/Svn/lib/libhmg.a(menupopup.o):menupopup.c:(.data+0x168): undefined reference to `HB_FUN_QMENU'
D:/HMG4/Hmg/Svn/lib/libhmg.a(dialogs.o):dialogs.c:(.data+0xa8): undefined reference to `HB_FUN_QFILEDIALOG'
D:/HMG4/Hmg/Svn/lib/libhmg.a(dialogs.o):dialogs.c:(.data+0x1d8): undefined reference to `HB_FUN_QCOLOR'
D:/HMG4/Hmg/Svn/lib/libhmg.a(dialogs.o):dialogs.c:(.data+0x1e8): undefined reference to `HB_FUN_QCOLORDIALOG'
D:/HMG4/Hmg/Svn/lib/libhmg.a(dialogs.o):dialogs.c:(.data+0x268): undefined reference to `HB_FUN_QFONT'
D:/HMG4/Hmg/Svn/lib/libhmg.a(dialogs.o):dialogs.c:(.data+0x2d8): undefined reference to `HB_FUN_QFONTDIALOG'
D:/HMG4/Hmg/Svn/lib/libhmg.a(dialogs.o):dialogs.c:(.data+0x3c8): undefined reference to `HB_FUN_QINPUTDIALOG'
D:/HMG4/Hmg/Svn/lib/libhmg.a(dialogs.o):dialogs.c:(.data+0x468): undefined reference to `HB_FUN_QSTRINGLIST'
D:/HMG4/Hmg/Svn/lib/libhmg.a(dialogs.o):dialogs.c:(.data+0x528): undefined reference to `HB_FUN_QDIR'
D:/HMG4/Hmg/Svn/lib/libhmg.a(dialogs.o):dialogs.c:(.data+0x5b8): undefined reference to `HB_FUN_QCLIPBOARD'
collect2: ld returned 1 exit status
hbmk2: Error: Running linker. 1
gcc.exe C:/DOCUME~1/luigi/IMPOST~1/Temp/hbmk_wtw4nf.dir/pgmp000.o C:/DOCUME~1/luigi/IMPOST~1/Temp/hbmk_wtw4nf.dir/l3w_xsystem.o C:/DOCUME~1/luigi/IMPOST~1/Temp/hbmk_wtw4nf.dir/hbmk_a8zapm.o -mwindows -Wl,--start-group -lhmg -lQtCore4 -lQtGui4 -lQtNetwork4 -lQtUiTools -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 -opgmp000.exe -LD:/HMG4/hmg/harbour/lib/win/mingw -LD:/HMG4/hmg/harbour/bin -LD:/HMG4/Hmg/Svn/lib -LD:/HMG4/hmg/qt/lib -LD:/HMG4/Hmg/HARBOUR/lib -LD:/HMG4/Hmg/mingw/lib
As you can see in the log, I've added the right path for Hmg and Hmg lib; at the same time I've added the right path for some Qtlibraries and QtCore4, QtGui4, QtNetwork4 adn QtUiTools.

I do'nt know where is the problem now :twisted:

Cheers
Attachments
MyTest.zip
source
(1.56 KiB) Downloaded 183 times
Luigi from Italy
www.L3W.it
User avatar
l3whmg
Posts: 694
Joined: Mon Feb 23, 2009 8:46 pm
Location: Italy
Contact:

Re: HMG4 harbour compiler option

Post by l3whmg »

Hi Rathinagiri,
I find solution about last post. Why I need insert hmg.hbc and I can't use libhmg.a?
I've modified my project files in this way:

pgm000p.hbp

Code: Select all

-prgflag=-w0 -es2 -gtgui
D:/HMG4/hmg/svn/hmg.hbc
pgm000p.hbc

pgmp000.prg
l3w_xsystem.prg
pgmp000.hbc

Code: Select all

incpaths=
libpaths=D:\HMG4\hmg\qt\lib
libs=QtCore4 QtGui4 QtNetwork4 QtUiTools
As you can see, in this way I don't use libhmg.a instead I must use hmg.hbc

The other problem, about /w flag, it's the same: with /w0 I can create executable program, with /w3 I can't.

Cheers
Luigi from Italy
www.L3W.it
Post Reply