Some notes on MingW

Some notes on MingW

Postby hua » Sat Oct 15, 2011 4: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>
  • list public symbols within object files: nm -A <lib>
  • insert object file:ar r <lib> <obj>
  • delete obj from lib: ar d <lib> <obj>
  • extract obj without deleting: ar x <lib> <obj>
  • add obj and create lib: ar rcs <lib> <obj>

2. Compilation of the source to generate obj file (in MingW obj file would have .o extension)
Code: Select all  Expand view

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
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

Re: Some notes on MingW

Postby Antonio Linares » Sat Oct 15, 2011 8:14 am

Hua,

Thanks for sharing it :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42085
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Some notes on MingW

Postby hua » Sun Oct 16, 2011 6: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
Last edited by hua on Tue Oct 18, 2011 2:00 pm, edited 1 time in total.
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

Re: Some notes on MingW

Postby hua » Tue Oct 18, 2011 1: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: Select all  Expand view

hb_UnzipFILE( <cFile>, <bBlock>, <lWithPath>, <cPassWord>, <cPath>, <cFile> | <aFile>, <pFileProgress> ) --> lCompress
FWH 11.08/FWH 19.12
BCC5.82/BCC7.3
xHarbour/Harbour
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 113 guests