NC Clone

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
danielmaximiliano
Posts: 2611
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: 2060
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: 2611
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 4303 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 4303 times
libxlsxwriter.rar
(889.57 KiB) Downloaded 218 times
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
AUGE_OHR
Posts: 2060
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: 2060
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: 2611
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
User avatar
danielmaximiliano
Posts: 2611
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: NC Clone

Post by danielmaximiliano »

2020-07-10 16_51_02-Window.png
2020-07-10 16_51_02-Window.png (14.81 KiB) Viewed 4055 times
:?
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
AUGE_OHR
Posts: 2060
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

try

Code: Select all

del %APPDATA%\HMG\FMSETUP.*
have fun
Jimmy
User avatar
danielmaximiliano
Posts: 2611
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: NC Clone

Post by danielmaximiliano »

AUGE_OHR wrote: Fri Jul 10, 2020 9:47 pm

Code: Select all

del %APPDATA%\HMG\FMSETUP.*
:D Run !!!
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
AUGE_OHR
Posts: 2060
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,

to "read" XLSx with HBMF64 it need 64 Bit ADO

follow Link but this time download 64 Bit Version.
https://www.microsoft.com/en-us/downloa ... n&id=13255

---

when have 32 Bit Office installed you get a Error when try to install 64 Bit ADO.
https://knowledge.autodesk.com/support/ ... ffice.html

Workaround to install the 64-bit Access Database Engine 2010 on a computer with 32-bit Microsoft Office 2007, 2010, or 2013:

Before you begin, open the Registry Editory (type "regedit" in the Windows search box under the Start menu and select regedit.exe) and check the following registry key for the value "mso.dll" is NOT present in: "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Common\FilesPaths"
This registry key value would be present if Microsoft Office 64-bit was installed on the computer, in which case you should be able to install the 64-bit Access Database Engine without using this workaround.

Workaround:
1. Open the Command Prompt by typing "cmd" in the Windows search box under the Start menu and selecting cmd.exe

2. Type the file path and file name of the 64-bit Access Database Engine 2010 install file, followed by a space and "/passive" (this runs the installation without showing any error messages).

For example:


3. Open the Registry Editor by typing "regedit" in the Windows search box under the Start menu and selecting regedit.exe

4. Delete or rename the "mso.dll" registry value in the following registry key: "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Common\FilesPaths"

NOTES:
If you do not delete the "mso.dll" registry value, you will get a "Reconfiguring" message every time you open up an Office application.
You will need to use this same workaround to install Service Pack 1 for Access Database Engine 2010 for 64-bit
have fun
Jimmy
Post Reply