I'm trying to compile the example attached (it's about sqlite) in HMG, but I can't get it working.
I keep on getting 'undefined reference to `sqlite3_xxxxx' errors

What should I do to make these errors go away?
Thanks,
Erik
Moderator: Rathinagiri
That's what I was missing. Thought it was some lib-thing, but didn't know where to put it!In your .hbc file, you have to include
libs=sqlite3
Add in hmg.hbc file located at c:\hmg\hmg.hbcClip2Mania wrote:That's what I was missing. Thought it was some lib-thing, but didn't know where to put it!In your .hbc file, you have to include
libs=sqlite3![]()
Thanks, Mr. Rathinagiri!
Erik
It happened to be the only lib which was "remmed out" (#) in hmg 3.3.1 (don't know why)Add in hmg.hbc file located at c:\hmg\hmg.hbc
Hi,Clip2Mania wrote: However, I still get following error (apparently cannot create the database)
I am using HMG 3.3.1 - 32 bits.
Should I recompile harbour or so?
Code: Select all
#include "hmg.ch"
declare window Main
Function main_button_1_action
public dbo := nil
if .not. file("nombre.db3")
crearbase("nombre.db3")
msginfo("BASE Creada")
return nil
else
dbo := connect2db("nombre.db3",.f.)
If dbo == nil
msginfo("no se puede conectar con la Base")
return nil
Endif
endif
if ! iswindowactive(vnombre)
Load Window vnombre
datossqlite()
vnombre.Center
vnombre.Activate
endif
Return Nil
function crearbase(mDb)
local sQry
dbo := connect2db(mDb,.t.)
if dbo == nil
msgstop("File could not be created!")
return nil
endif
// create table
sQry := 'CREATE TABLE IF NOT EXISTS "personales" ("id" INTEGER PRIMARY KEY, "nombre" VARCHAR(55), "telefono" VARCHAR(15), "fecha" DATE);'
MiscSql(dbo, sQry)
return nil