build error : c:\hmg.3.4.4\SAMPLES\HFCL\SQL\HMGSQLite

Moderator: Rathinagiri

Post Reply
User avatar
hmgchang
Posts: 239
Joined: Tue Aug 13, 2013 4:46 am
Location: Indonesia
Has thanked: 1 time
Been thanked: 4 times

build error : c:\hmg.3.4.4\SAMPLES\HFCL\SQL\HMGSQLite

Post by hmgchang » Tue Jun 05, 2018 9:10 pm

Dear Friends,

built and error on build error : c:\hmg.3.4.4\SAMPLES\HFCL\SQL\HMGSQLite

the build.log :

Code: Select all

hbmk2: Triggered by #require directive: hmgsqlite.hbc
hbmk2[demo]: Warning: Cannot find hmgsqlite.hbc
hbmk2: Linking... demo.exe
.hbmk/win/mingw/demo.o:demo.c:(.data+0xa8): undefined reference to `HB_FUN_CONNECT2DB'
.hbmk/win/mingw/demo.o:demo.c:(.data+0x168): undefined reference to `HB_FUN_SQL'
.hbmk/win/mingw/demo.o:demo.c:(.data+0x178): undefined reference to `HB_FUN_C2SQL'
.hbmk/win/mingw/demo.o:demo.c:(.data+0x218): undefined reference to `HB_FUN_MISCSQL'
collect2.exe: error: ld returned 1 exit status
hbmk2[demo]: Error: Running linker. 1
gcc.exe .hbmk/win/mingw/demo.o .hbmk/win/mingw/_hbmkaut_demo.o c:/hmg.3.4.4/SAMPLES/HFCL/SQL/HMGSQLite/_temp.o    -pthread  -static-libgcc  -static-libstdc++  -static -lpthread -mwindows -Wl,--start-group -lhmg -lcrypt -ledit -leditex -lgraph -lini -lreport -lhfcl -lmsvfw32 -lvfw32 -lhbmysql -lmysql -lhbfimage -lhbpgsql -lsddmy -lhbvpdf -lhbct -lhbwin -lhbmzip -lminizip -lhbmemio -lhbmisc -lhbtip -lsqlite3 -lhbsqlit3 -lsddodbc -lrddsql -lhbodbc -lodbc32 -lhbhpdf -lhbnetio -lxhb -lpng -llibhpdf -lhbzebra -lhbextern -lhbdebug -lhbvmmt -lhbrtl -lhblang -lhbcpage -lgtcgi -lgtpca -lgtstd -lgtwin -lgtwvt -lgtgui -lhbrdd -lhbuddall -lhbusrrdd -lrddntx -lrddcdx -lrddnsx -lrddfpt -lhbrdd -lhbhsx -lhbsix -lhbmacro -lhbcplr -lhbpp -lhbcommon -lhbmainwin -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 -odemo.exe  -LC:/hmg.3.4.4/harbour/lib/win/mingw -LC:/hmg.3.4.4/lib

hbmk2: Error: Referenced, missing, but unknown function(s): CONNECT2DB(),
       SQL(), C2SQL(), MISCSQL()
TIA

best rgds,
Chang
Just Hmg It !

jayadevu
Posts: 213
Joined: Tue May 19, 2009 7:10 am
Been thanked: 8 times

Post by jayadevu » Wed Jun 06, 2018 6:18 am

Hi Chang,

These functions are in hmgsqlite.prg found in c:\hmg.3.4.4\SOURCE\HMGSQL

Warm regards,

Jayadev

User avatar
dragancesu
Posts: 549
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia
Has thanked: 13 times
Been thanked: 99 times

Post by dragancesu » Wed Jun 06, 2018 6:19 am

You need hmgsql library

Look at c:\hmg.3.4.4\SOURCE\HMGSQL and create library what you need

User avatar
hmgchang
Posts: 239
Joined: Tue Aug 13, 2013 4:46 am
Location: Indonesia
Has thanked: 1 time
Been thanked: 4 times

Post by hmgchang » Wed Jun 06, 2018 9:45 pm

Thanks Dragancesu,
Maybe this is not an original sample from HMG,
if I am not mistake its from the HMGforum...
Anyway every code is a good teacher for me...

best rgds,
Chang
Just Hmg It !

User avatar
dragancesu
Posts: 549
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia
Has thanked: 13 times
Been thanked: 99 times

Post by dragancesu » Thu Jun 07, 2018 6:44 am

Sample is OK, but you must do

1. on folder c:\hmg.3.4.4\SOURCE\HMGSQL run buildlib.bat
then you can see new library in c:\hmg.3.4.4\lib

2. then c:\hmg.3.4.4\hmg32.hbc add line libs=hmgsqlite

3. then compile demo c:\hmg.3.4.4\SAMPLES\HFCL\SQL\HMGSQLite
it's work

p.s. this library is not default, this is Rathi's work, search forum for it

User avatar
mustafa
Posts: 670
Joined: Fri Mar 20, 2009 11:38 am
Location: Alicante - Spain
Been thanked: 74 times

Post by mustafa » Thu Jun 07, 2018 11:13 am

Hi friend Chang
Look at this Sqlite sample I published
viewtopic.php?f=9&t=4795&p=45549&hilit= ... ite#p45549
Sample New ---> Sqlite_Sample_New.zip
Regards
Mustafa

Post Reply