NC Clone

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
AUGE_OHR
Posts: 2063
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: NC Clone

Post by AUGE_OHR »

latest Version 0.97
HBFM097.zip
(1.96 MiB) Downloaded 191 times
fixed : Dirwatch produce "dupe" in GRID

since v0.83 i have use DirWatch with

Code: Select all

      // watch file name changes ( file was CREATED, RENAMED or DELETED)
      pChangeHandle := wapi_FindFirstChangeNotification( cDir, .F., FILE_NOTIFY_CHANGE_FILE_NAME )
now i found out that i have to use

Code: Select all

      pChangeHandle := wapi_FindFirstChangeNotification( cDir, .F., FILE_NOTIFY_CHANGE_NAME )
to get rid of "dupe" in GRID
// v.0.97 24.05.2020 working DirWatch ... FILE_NOTIFY_CHANGE_FILE_NAME -> FILE_NOTIFY_CHANGE_NAME
// v.0.96 21.05.2020 Problem with (many) DirWatch and TAB > 1 - aWatchThread
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2063
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: NC Clone

Post by AUGE_OHR »

hi,

here latest Version 1.03
HBFM103.zip
(2.09 MiB) Downloaded 188 times
// v.1.03 10.06.2020 fix WatchDirLeft() / WatchDirRight() empty Path
// v.1.02 03.06.2020 HbFilter more validation
// v.1.01 02.06.2020 HbFilter
//
// v.1.00 29.05.2020 INIT PROC before MAIN
// v.0.99 27.05.2020 Export : DBF, XLSx, SDF
// v.0.98 26.05.2020 PickList()
when View / Edit (F3/F4) DBF you get a Picklist for Fields in DBF.
ESC -> all Fields

F5 "Copy" in Browser : Export to Excel need libxlsxwriter.dll.
DLL_Only_xlsxwriter.zip
(328.1 KiB) Downloaded 201 times
F3 now read Excel XLSx Files via ADO and display in GRID ( no Fx Button yet )

HBFM only start once as i have not test it with many Instance

in Browse you can press Crtl-F8 to get "Filter-Assistant"
if you want you can direct write in Editbox and EVAL() it

---

know Problem :

DirWatch does not recognize Create / Delete Folder
without libxlsxwriter.dll "pure" Version is buggy writing XLSx Files
Darkmode : when GRID does not fill full TAB Background might be not Darkmode
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2063
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: NC Clone

Post by AUGE_OHR »

hi,

forgot that ADO is not part of Windows 10 ... it is from Office :roll:

but you can get Engine here : AccessDatabaseEngine
https://www.microsoft.com/de-de/downloa ... x?id=13255
this is a German Link and from 2010 but it work with XLSx

there are also newer Version like 2016 here
https://www.microsoft.com/en-us/downloa ... x?id=54920
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2063
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: NC Clone

Post by AUGE_OHR »

hi,

here 64 Bit Version of HBFM64
Image
HBFM64.zip
(2.4 MiB) Downloaded 186 times
for FreeImage64 it need this DLL
http://www.hmgforum.com/viewtopic.php?f ... 7&start=23

XLSx Files does not work in this 64 Bit Version while i have no libxlsxwriter64.dll :(
have fun
Jimmy
User avatar
danielmaximiliano
Posts: 2612
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: NC Clone

Post by danielmaximiliano »

AUGE_OHR wrote: Thu Jul 09, 2020 3:57 am
XLSx Files does not work in this 64 Bit Version while i have no libxlsxwriter64.dll :(
Installation on Windows using Mingw-w64 and MSYS2

The libxlsxwriter library can also be compiled on Windows using the Mingw-w64 "Minimalist GNU for Windows" toolchain. These tools can be run from the Windows cmd.exe but it is recommended to use the MSYS2 "Minimal System" Bourne Shell.

Here are some instructions on how to compile libxlsxwriter with Mingw-w64 and MSYS2:

# Install MSYS2 64 or 32 bit from http://msys2.github.io/

# Install the dev tools for libxlsxwriter.
pacman -S git gcc make zlib-devel

# Clone and build libxlsxwriter.
git clone https://github.com/jmcnamara/libxlsxwriter.git
cd libxlsxwriter/
make
https://libxlsxwriter.github.io/getting_started.html
Get the source code via Git

Clone the libxlsxwriter source code repository from GitHub as follows:

git clone https://github.com/jmcnamara/libxlsxwriter.git
# Or use your preferred protocol instead of https.

Get the source code as a tarball

If you prefer you can get a tarball of the latest code as follows:

curl -O -L http://github.com/jmcnamara/libxlsxwrit ... ter.tar.gz
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
AUGE_OHR
Posts: 2063
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: NC Clone

Post by AUGE_OHR »

hi,
danielmaximiliano wrote: Thu Jul 09, 2020 11:27 pm
Installation on Windows using Mingw-w64 and MSYS2
The libxlsxwriter library can also be compiled on Windows using the Mingw-w64 "Minimalist GNU for Windows" toolchain.
thx for Answer.
my Question was about Libxlsxwriter64.DLL

i have build 64 Build Wrapper for Libxlsxwriter.DLL with Source from this Thread
https://www.hmgforum.com/viewtopic.php?f=35&t=5067

but it does not work with 32 Bit Libxlsxwriter.DLL so i search for 64 Bit Version
have fun
Jimmy
User avatar
danielmaximiliano
Posts: 2612
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: NC Clone

Post by danielmaximiliano »

Jimmy:
Download Libxlsxwriter from the GitHub repositories.
install msys64
in windows run CMD
2020-07-09 23_22_52-Libxlsxwriter.png
2020-07-09 23_22_52-Libxlsxwriter.png (20.17 KiB) Viewed 4396 times
DLL and .a were generated
2020-07-09 23_32_33-lib.png
2020-07-09 23_32_33-lib.png (4.97 KiB) Viewed 4396 times
libxlsxwriter.rar
(889.57 KiB) Downloaded 223 times
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
AUGE_OHR
Posts: 2063
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: NC Clone

Post by AUGE_OHR »

hi
DLL and .a were generated
aha ... :idea:
i thought it only build LIB :?

i include LIB and try to compile / link
hbmk2: Compiling...
hbmk2: Linking... HBFM64.exe
.hbmk/win/mingw64/EXPORT.o:EXPORT.c:(.data+0xbb0): undefined reference to `HB_FUN_LXW_INIT'
.hbmk/win/mingw64/EXPORT.o:EXPORT.c:(.data+0xbd0): undefined reference to `HB_FUN_LXW_WORKBOOK_NEW'
.hbmk/win/mingw64/EXPORT.o:EXPORT.c:(.data+0xbf0): undefined reference to `HB_FUN_LXW_WORKBOOK_ADD_WORKSHEET'
.hbmk/win/mingw64/EXPORT.o:EXPORT.c:(.data+0xc10): undefined reference to `HB_FUN_LXW_WORKBOOK_ADD_FORMAT'
.hbmk/win/mingw64/EXPORT.o:EXPORT.c:(.data+0xc30): undefined reference to `HB_FUN_LXW_FORMAT_SET_NUM_FORMAT'
.hbmk/win/mingw64/EXPORT.o:EXPORT.c:(.data+0xc50): undefined reference to `HB_FUN_LXW_WORKSHEET_WRITE_STRING'
.hbmk/win/mingw64/EXPORT.o:EXPORT.c:(.data+0xc70): undefined reference to `HB_FUN_LXW_WORKSHEET_WRITE_NUMBER'
.hbmk/win/mingw64/EXPORT.o:EXPORT.c:(.data+0xc90): undefined reference to `HB_FUN_LXW_WORKSHEET_WRITE_BOOLEAN'
.hbmk/win/mingw64/EXPORT.o:EXPORT.c:(.data+0xcb0): undefined reference to `HB_FUN_LXW_WORKSHEET_WRITE_DATETIME'
.hbmk/win/mingw64/EXPORT.o:EXPORT.c:(.data+0xcd0): undefined reference to `HB_FUN_LXW_WORKBOOK_CLOSE'
collect2.exe: error: ld returned 1 exit status
hbmk2[HBFM64]: Error: Running linker. 1
we have 64 Bit DLL / LIB but now we need 64 Bit "Wrapper" of hblibxlsxwriter -> libhblibxlsxwriter.a

---

so i try build Wrapper for 64 Bit with Make_Lib.cmd
Generating C source output to 'R:\Temp\hbmk_135yd0.dir\hblibxlsxwriter.c'... Done.
hblibxlsxwriter.prg:4894:25: fatal error: xlsxwriter.h: No such file or directory
...
gcc.exe -c -O3 -W -Wall -pipe -I"C:/hmg.3.4.4/harbour-64/include"
hm ... now i copy all *.h from c:\hmg.3.4.4\1\XLSX\xlsxwriter\ to C:\hmg.3.4.4\harbour-64\include
R:/Temp/hbmk_0ialz8.dir/hblibxlsxwriter.o:hblibxlsxwriter.c:(.data+0x130): undefined reference to `HB_FUN_HB_CSTRUCTURE'

R:/Temp/hbmk_0ialz8.dir/hblibxlsxwriter.o:hblibxlsxwriter.c:(.data+0x1a70): undefined reference to `HB_FUN_HB_CSTRUCTURE
CSYNTAX'
R:/Temp/hbmk_0ialz8.dir/hblibxlsxwriter.o:hblibxlsxwriter.c:(.data+0x1ab0): undefined reference to `HB_FUN___ACTIVESTRUC
TURE'
... hm :(
have fun
Jimmy
User avatar
AUGE_OHR
Posts: 2063
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

Re: NC Clone

Post by AUGE_OHR »

hi,

i have now include hblibxlsxwriter.prg and CStruct.ch, hbctypes.ch, Wintypes.ch, hblibxlsxwriter.ch into HBFM64

now when try to load libxlsxwriter.dll and look into debugger

Code: Select all

FUNCTION lxw_init() 
nHDll := hb_libLoad( "libxlsxwriter.dll" )
ALTD()
nHDll := HMG_CallDLL( "Kernel32.dll",, "LoadLibrary", "libxlsxwriter.dll" )
RETURN nHDll
both time it is 0 :o

it this a 64 Bit Problem of libxlsxwriter.dll :?:
how to load 64 Bit DLL :idea:
have fun
Jimmy
User avatar
danielmaximiliano
Posts: 2612
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: NC Clone

Post by danielmaximiliano »

Hi Jimmy
Look here : http://www.kresin.ru/en/hrbfaq.html
Search hb_libLoad
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
Post Reply