Dbf to Sqlite database: modification to 'C' file for windows compatability

340 views
Skip to first unread message

Jayadev

unread,
Apr 5, 2018, 5:14:31 AM4/5/18
to Harbour Users
Hi,

In the following link, there is a "C" program which can convert Dbf to Sqlite database extremely fast. 

It works flawlessly in Linux.

My request is to one of the cross platform Guru's to convert it into Windows compatible Object or "C" ( Problem with some Header files, easily recognized in Linux but not in Windows) so that all can use it as a Windows program.

Link:
https://github.com/mobigroup/sqlite3-dbf.git

Warm regards,

Jayadev

Roberto Borges

unread,
Apr 5, 2018, 8:17:13 AM4/5/18
to Harbour Users
TKS !!!
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Antonio Lima

unread,
Apr 5, 2018, 11:15:06 PM4/5/18
to Harbour Users
Hi Jayadev;

Done !!!

Just compiled with MINGW 7.30
Test at your own risk.

[Please; rename the zipped file from sqlite3-dbf.exe.RENAMEME to sqlite3-dbf.exe]

Best regards,

Antonio Lima
Brazil
--------------
HMG 18.03 compiled with Mingw 7.30 32/64 bits
Mingw 7.30 win 32/64
Harbour 3.40 compiled with Mingw 7.30 32/64 bits

=========================[
sqlite3-dbf.exe]=========================

C:\>sqlite3-dbf.exe

Usage: sqlite3-dbf.exe [-m memofilename] filename [indexcolumn ...]
Convert the named XBase file into SQLite format

  -h  print this message and exit
  -m  the name of the associated memo file (if necessary)

SQLite3-DBF is copyright 2010 Alexey Pechnikov
Utility based on source code of PgDBF (c) 2009 Daycos
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Report bugs to <pechnikov .a-t.mobigroup.ru>

-------------------------------------------------------------------------------
HARBOUR 4 Windows version: Antonio Lima - BRAZIL - 2018-04-05
-------------------------------------------------------------------------------


=========================[sqlite3-dbf.exe]=========================
sqlite3-dbf.zip

Jayadev Urath

unread,
Apr 6, 2018, 1:11:26 AM4/6/18
to Harbour Users
Dear Antonio,

Many thanks for your effort.  Could you also send me the modified "C" file, so that I can compile here in Windows.  Alternatively can you change the main function in 'C' to dbf2sqlite and send me the modified object so that I can link with my main program.

Thanks again for your help.

Warm regards,

Jayadev


On Thu, Apr 5, 2018 at 11:35 PM, Antonio Lima <l...@rota66.net> wrote:
Done !!!
Test at your own risk.

Antonio Lima
Brazil

======================================================

C:\>sqlite3-dbf

Usage: sqlite3-dbf [-m memofilename] filename [indexcolumn ...]
Convert the named XBase file into SQLite format

  -h  print this message and exit
  -m  the name of the associated memo file (if necessary)

SQLite3-DBF is copyright 2010 Alexey Pechnikov
Utility based on source code of PgDBF (c) 2009 Daycos
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Report bugs to <pechnikov .a-t.mobigroup.ru>

-------------------------------------------------------------------------------
HARBOUR 4 Windows version: Antonio Lima - BRAZIL - 2018-04-05
-------------------------------------------------------------------------------

======================================================


On Thursday, April 5, 2018 at 6:14:31 AM UTC-3, Jayadev wrote:

--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.
Unsubscribe: harbour-users+unsubscribe@googlegroups.com
Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Antonio Lima

unread,
Apr 6, 2018, 7:55:41 AM4/6/18
to Harbour Users
Hi Jayadev,

Here are the files ...
Compile with: hbmk2 sqlite3-dbf.c -lmman
ignore the warnings ...

libmman.a is included, if necessary.

Best regards,

Antonio Lima
SOURCE-sqlite3-dbf.zip

Jayadev U

unread,
Apr 6, 2018, 11:46:37 AM4/6/18
to harbou...@googlegroups.com

Hi Antonio,

 

Thanks so much for all your efforts.

 

Warm regards,

 

Jayadev

 

 

--

--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.


Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.

Mario Lobo

unread,
Apr 6, 2018, 1:21:14 PM4/6/18
to Harbour Users
Compiles flawlessly out of the box on FreeBSD.

BW,

Mario


On Thursday, April 5, 2018 at 6:14:31 AM UTC-3, Jayadev wrote:

Jayadev

unread,
Apr 9, 2018, 4:28:19 AM4/9/18
to Harbour Users
Hi Antonio,

I have since tried to compile sqlite3-dbf.c with the following command:

hbmk2 sqlite3-dbf.c -lmman -Le:\projects\jdtest\dbf2sqlite

it throws up the errros as per attachement.

of particular importance are the last 2 lines:

e:/hb32/lib/win/mingw/libhbmainstd.a(mainstd.o):mainstd.c:(.text.startup+0x0): multiple definition of `main'
C:/Users/jayadev/AppData/Local/Temp/hbmk_mpuxy8.dir/sqlite3-dbf.o:sqlite3-dbf.c:(.text.startup+0x0): first defined here
e:/hb32/lib/win/mingw/libhbmacro.a: error adding symbols: Malformed archive

Kindly look into the log oblige.

Warm regards,

Jayadev
error.log

Antonio Lima

unread,
Apr 9, 2018, 8:48:29 AM4/9/18
to Harbour Users
Sorry Jayadev,

I'm affraid I can't help you.
Actually I prefer Harbour 3.4 dev / Mingw 7.3 / HMG 18.03 instead of Harbour 3.2 version

U can download it at https://github.com/Petewg/MgM/tree/18.03

Victor Szakats really did a great job with Harbour 3.4 Fork.

BR,

Antonio Lima.


Jayadev Urath

unread,
Apr 9, 2018, 8:59:36 AM4/9/18
to Harbour Users
Hi Antonio,

Ok, I have also used Harbour 3.4 Dev extensively.  Are you saying that it will compile with Harbour 3.4+MIngw 7.3 correctly?

I have used HMG extended 18.03 with BCC.  I shall try with MingW.

Warm regards,

Jayadev


--
--
You received this message because you are subscribed to the Google
Groups "Harbour Users" group.

Web: http://groups.google.com/group/harbour-users

---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-users+unsubscribe@googlegroups.com.

Jayadev

unread,
Apr 9, 2018, 9:08:06 AM4/9/18
to Harbour Users
Ok Antonio,

I checked with Harbour 3.4 dev / Mingw 7.3, works correctly.  Thanks for your continued support.

Warm regards,

Jayadev
Reply all
Reply to author
Forward
0 new messages