FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Some notes on MingW
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Some notes on MingW
Posted: Sat Oct 15, 2011 04:57 AM
MingW is a port of the infamous GCC from linux to windows.

1. These are some of the commands that I noted to manipulate library in the course of my studying it:


  • list object file names: ar -t <lib>[/*:m]
  • list public symbols within object files: nm -A <lib>[/*:m]
  • insert object file:ar r <lib> <obj>[/*:m]
  • delete obj from lib: ar d <lib> <obj>[/*:m]
  • extract obj without deleting: ar x <lib> <obj>[/*:m]
  • add obj and create lib: ar rcs <lib> <obj>[/*:m][/list:u]

    2. Compilation of the source to generate obj file (in MingW obj file would have .o extension)
    Code (fw): Select all Collapse
    hbmk2 -w -n -m -clipper %1.prg c:\fwh\fwh.hbc xhb.hbc


    I had to include xhb.hbc in my case because I #include "xhb.ch" in fivewin.ch

    3. It should be noted that MingW doesn't behave like BCC when it determine which function to link-in. In BCC it's more like a case of first come first serve whereas MingW behaves like MSVC where it check a function's interface and then decide which function to actually link in. This will definitely cause headache and confusion for those who have only ever work with Clipper or BCC before.

    This is just a note from a beginner in using Harbour+MingW. Any feedback is welcome.

    TIA
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Some notes on MingW
Posted: Sat Oct 15, 2011 08:14 AM

Hua,

Thanks for sharing it :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: Some notes on MingW
Posted: Sun Oct 16, 2011 06:28 PM

You're welcome Antonio. Some more notes though this actually has more to do with using Harbour instead of xHarbour. C compiler does not factor here.

The library that handles zip file in Harbour and xHarbour is different. To ease transitions from zip-related codes in xHarbour to Harbour, hbziparc was created. It has api's that translates zip functions in xHarbour to functions available in minizip library used by Harbour. As such don't expect a 100% level of compatibility. Some functions/features available in ziparc used by xHarbour such as disk spanning is not supported when using Harbour.

Any corrections to what I noted above is welcome.

TIA

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: Some notes on MingW
Posted: Tue Oct 18, 2011 01:58 PM
When using Harbour and hbziparc, take note when using hb_unzipfile() that only bBlock is supported. lWithPath and pFileProgress are not implemented.
Code (fw): Select all Collapse
hb_UnzipFILE( <cFile>, <bBlock>, <lWithPath>, <cPassWord>, <cPath>, <cFile> | <aFile>, <pFileProgress> ) --> lCompress
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour

Continue the discussion