Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Build hbsqlit3 demo.prg #161

Open
WillianBR opened this issue Sep 21, 2017 · 1 comment
Open

How to Build hbsqlit3 demo.prg #161

WillianBR opened this issue Sep 21, 2017 · 1 comment

Comments

@WillianBR
Copy link

I having issues to compile demo.prg (/contrib/hbsqlit3/tests/demo.prg).

$ hbmk2 demo.prg
hbmk2: Processando script local: hbmk.hbm
hbmk2: Atenção: Não é possível encontrar o ../3rd/sqlite3/sqlite3.hbc
(referenciado por hbsqlit3.hbc)
Harbour 3.2.0dev (r1612161005)
Copyright (c) 1999-2016, http://harbour-project.org/
Compiling 'demo.prg'...
Lines 274, Functions/Procedures 3
Generating C source output to '/tmp/hbmk_uBOh9m.dir/demo.c'... Done.
/usr/lib/harbour/libhbsqlit3.a(core.o): In function hb_sqlite3_destructor': (.text+0xb3): undefined reference to sqlite3_close'
/usr/lib/harbour/libhbsqlit3.a(core.o): In function func': (.text+0x196): undefined reference to sqlite3_user_data'
/usr/lib/harbour/libhbsqlit3.a(core.o): In function func': (.text+0x211): undefined reference to sqlite3_value_type'
/usr/lib/harbour/libhbsqlit3.a(core.o): In function func': (.text+0x291): undefined reference to sqlite3_result_error_code'
/usr/lib/harbour/libhbsqlit3.a(core.o): In function func': (.text+0x2a6): undefined reference to sqlite3_value_bytes'
...
/usr/lib/harbour/libhbsqlit3.a(core.o): In function HB_FUN_SQLITE3_COMMIT_HOOK': (.text+0x2f11): undefined reference to sqlite3_commit_hook'
/usr/lib/harbour/libhbsqlit3.a(core.o): In function HB_FUN_SQLITE3_COMMIT_HOOK': (.text+0x2f21): undefined reference to sqlite3_commit_hook'
/usr/lib/harbour/libhbsqlit3.a(core.o): In function HB_FUN_SQLITE3_ROLLBACK_HOOK': (.text+0x3001): undefined reference to sqlite3_rollback_hook'
/usr/lib/harbour/libhbsqlit3.a(core.o): In function HB_FUN_SQLITE3_ROLLBACK_HOOK': (.text+0x3011): undefined reference to sqlite3_rollback_hook'
collect2: error: ld returned 1 exit status
hbmk2: Erro: Executando linkeditor. 1
gcc '/tmp/hbmk_uBOh9m.dir/demo.o' '/tmp/hbmk_uBOh9m.dir/hbmk_QdLMwI.o' -Wl,--start-group -lhbsqlit3 -lhbcplr -lhbdebug -lharbour -Wl,--end-group -odemo -L/usr/lib/harbour

hbmk2: Dica: Instale o pacote hbsqlit3 e adicione as opções 'hbsqlit3.hbc'
faltando nas funções: sqlite3_rollback_hook(), sqlite3_commit_hook(),
sqlite3_progress_handler(), sqlite3_busy_handler(), sqlite3_interrupt(),
sqlite3_trace(), sqlite3_profile(), sqlite3_reset_auto_extension(),
sqlite3_create_function(), sqlite3_compileoption_get(),
sqlite3_compileoption_used(), sqlite3_limit(), sqlite3_db_status(),
sqlite3_status(), sqlite3_threadsafe(), sqlite3_memory_highwater(),
sqlite3_memory_used(), sqlite3_backup_pagecount(),
sqlite3_backup_remaining(), sqlite3_backup_finish(),
sqlite3_backup_step(), sqlite3_backup_init(), sqlite3_set_authorizer(),
sqlite3_enable_shared_cache(), sqlite3_get_autocommit(),
sqlite3_blob_write(), sqlite3_blob_read(), sqlite3_blob_bytes(),
sqlite3_blob_close(), sqlite3_blob_reopen(), sqlite3_blob_open(),
sqlite3_get_table(), sqlite3_busy_timeout(),
sqlite3_enable_load_extension(), sqlite3_load_extension(),
sqlite3_column_text(), sqlite3_column_int64(), sqlite3_column_int(),
sqlite3_column_double(), sqlite3_column_blob(), sqlite3_column_bytes(),
sqlite3_column_name(), sqlite3_column_decltype(), sqlite3_column_type(),
sqlite3_column_count(), sqlite3_total_changes(), sqlite3_changes(),
sqlite3_bind_parameter_name(), sqlite3_bind_parameter_index(),
sqlite3_bind_parameter_count(), sqlite3_bind_zeroblob(),
sqlite3_bind_text(), sqlite3_bind_null(), sqlite3_bind_int64(),
sqlite3_bind_int(), sqlite3_bind_double(), sqlite3_bind_blob(),
sqlite3_finalize(), sqlite3_reset(), sqlite3_clear_bindings(),
sqlite3_step(), sqlite3_stmt_readonly(), sqlite3_stmt_status(),
sqlite3_sql(), sqlite3_complete(), sqlite3_prepare(), sqlite3_exec(),
sqlite3_open_v2(), sqlite3_open(), sqlite3_last_insert_rowid(),
sqlite3_sleep(), sqlite3_errmsg(), sqlite3_extended_errcode(),
sqlite3_errcode(), sqlite3_extended_result_codes(), sqlite3_shutdown(),
sqlite3_initialize(), sqlite3_sourceid(), sqlite3_libversion_number(),
sqlite3_libversion()

Can anybody help me?

@WillianBR
Copy link
Author

I found it!

I had to fix the file hbsqlit3.hbc. I have fixed the variable libs with the right file path.

And after that, I had change the command line of hbmk2.

$ hbmk2 demo.prg -L/home/willian/Projects/harbour/core-master/contrib/3rd/sqlite3/ -ldl -lpthread

The compilation process output was:

hbmk2: Processando script local: hbmk.hbm
Harbour 3.2.0dev (r1612161005)
Copyright (c) 1999-2016, http://harbour-project.org/
Compiling 'demo.prg'...
Lines 274, Functions/Procedures 3
Generating C source output to '/tmp/hbmk_6yUhgz.dir/demo.c'... Done.

Now, the demo.prg is working fine.

Thank anyway!

@WillianBR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant