Wrapper for LIBXL libxlsxwriter.dll for Harbour

Issues and Discussions related to Harbour

Moderator: Rathinagiri

RPC
Posts: 205
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF
Has thanked: 87 times
Been thanked: 11 times

Re: Wrapper for LIBXL libxlsxwriter.dll for Harbour

Post by RPC »

Hi bpd2000
Thanks
Changed as you suggested. It compiles now and I get libxlw.exe but what does it do ?
Should I compile demo.prg in example subdir ,but then what files need to be added to modules tab in IDE besides demo.prg,
There are many *.prg files in examples subdir.
Pls advice.
Thanks

User avatar
bpd2000
Posts: 1135
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 228 times
Been thanked: 130 times

Post by bpd2000 »

RPC wrote:
Thu Apr 16, 2020 5:44 pm
Hi bpd2000
Thanks
Changed as you suggested. It compiles now and I get libxlw.exe but what does it do ?
Should I compile demo.prg in example subdir ,but then what files need to be added to modules tab in IDE besides demo.prg,
There are many *.prg files in examples subdir.
Pls advice.
Thanks
Hi
1. This wrapper and examples are for Harbour [no gui]
2. Download Attached working folder [posted as on 11/04/2020 page-1]
3. Unzip to C drive [i.e C:\hblibxlsxwriter]
4. set required path for harbour and mingw compiler
5. open cmd window at C:\hblibxlsxwriter and run make_lib.cmd [it will create libhblibxlsxwriter.a library]
5. open cmd window at C:\hblibxlsxwriter\example and run test.cmd [it will create demo.exe]
6. now run demo.exe from cmd window [it will create demo.xlsx silently in the same folder]
If you success, then study the code, .hbp files etc. and start incorporating in HMG
BPD
Convert Dream into Reality through HMG

RPC
Posts: 205
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF
Has thanked: 87 times
Been thanked: 11 times

Post by RPC »

bpd2000 wrote:
Fri Apr 17, 2020 2:21 am
4. set required path for harbour and mingw compiler
5. open cmd window at C:\hblibxlsxwriter and run make_lib.cmd [it will create libhblibxlsxwriter.a library]

Hi bpd2000
Thanks for step by step guide.
I have come upto step 5 and get following error

C:\hblibxlsxwriter>hbmk2 libxlw.hbp
Harbour 3.2.0dev (r1703241902)
Copyright (c) 1999-2016, http://harbour-project.org/
Compiling 'hblibxlsxwriter.prg'...
Lines 5520, Functions/Procedures 171
Generating C source output to 'C:\Users\rpcch\AppData\Local\Temp\hbmk_conllm.dir\hblibxlsxwriter.c'... Done.
C:/Users/rpcch/AppData/Local/Temp/hbmk_conllm.dir/hblibxlsxwriter.o:hblibxlsxwriter.c:(.data+0xa8): undefined reference to `HB_FUN_HB_CSTRUCTURE'
C:/Users/rpcch/AppData/Local/Temp/hbmk_conllm.dir/hblibxlsxwriter.o:hblibxlsxwriter.c:(.data+0xd48): undefined reference to `HB_FUN_HB_CSTRUCTURECSYNTAX'
C:/Users/rpcch/AppData/Local/Temp/hbmk_conllm.dir/hblibxlsxwriter.o:hblibxlsxwriter.c:(.data+0xd68): undefined reference to `HB_FUN___ACTIVESTRUCTURE'
collect2.exe: error: ld returned 1 exit status
hbmk2[libxlw]: Error: Running linker. 1
gcc.exe C:/Users/rpcch/AppData/Local/Temp/hbmk_conllm.dir/hblibxlsxwriter.o C:/Users/rpcch/AppData/Local/Temp/hbmk_conllm.dir/hbmk_nod7j8.o -mconsole -Wl,--start-group -lhbextern -lhbdebug -lhbvm -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -lgtwin -lgtwvt -lgtgui -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon -lhbmainstd -lkernel32 -luser32 -lgdi32 -ladvapi32 -lws2_32 -liphlpapi -lwinspool -lcomctl32 -lcomdlg32 -lshell32 -luuid -lole32 -loleaut32 -lmpr -lwinmm -lmapi32 -limm32 -lmsimg32 -lwininet -lhbpcre -lhbzlib -Wl,--end-group -ohblibxlsxwriter.exe -Lc:/hmg.3.4.4/harbour/lib/win/mingw

hbmk2: Hint: Add option 'xhb.hbc' for missing function(s): __ActiveStructure(),
hb_CStructureCSyntax(), hb_CStructure()


It is asking to 'Add option xhp.hbc' how to do that ?
Please help
Thanks

User avatar
bpd2000
Posts: 1135
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 228 times
Been thanked: 130 times

Post by bpd2000 »

use command as
hbmk2 libxlw.hbp xhb.hbc
or add xhb.hbc in make_lib.cmd
BPD
Convert Dream into Reality through HMG

RPC
Posts: 205
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF
Has thanked: 87 times
Been thanked: 11 times

Post by RPC »

bpd2000 wrote:
Fri Apr 17, 2020 8:03 am
use command as
hbmk2 libxlw.hbp xhb.hbc
or add xhb.hbc in make_lib.cmd
Hi bpd2000
Got it now, though had to add path for xhb.hbc
Many thanks
Now how to link this so that lxw_* functions are available on HMG programs ?

User avatar
bpd2000
Posts: 1135
Joined: Sat Sep 10, 2011 4:07 am
Location: India
Has thanked: 228 times
Been thanked: 130 times

Post by bpd2000 »

RPC wrote:
Fri Apr 17, 2020 9:26 am
bpd2000 wrote:
Fri Apr 17, 2020 8:03 am
use command as
hbmk2 libxlw.hbp xhb.hbc
or add xhb.hbc in make_lib.cmd
Hi bpd2000
Got it now, though had to add path for xhb.hbc
Many thanks
Now how to link this so that lxw_* functions are available on HMG programs ?
Follow this for HMG32
1. Copy hblibxlsxwriter.ch to c:\hmg\include
2. Copy libhblibxlsxwriter.a to c:\hmg\lib
3. add libs=hblibxlsxwriter at line no 52 of hmg32.hbc
4. now build example [c:\hmg\build demo.prg]
BPD
Convert Dream into Reality through HMG

RPC
Posts: 205
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF
Has thanked: 87 times
Been thanked: 11 times

Post by RPC »

bpd2000 wrote:
Fri Apr 17, 2020 3:03 pm
Follow this for HMG32
Hi bpd2000
Finally got it.
Many thanks for patiently explaining everything.
with best wishes.

Post Reply