[SOLVED] (opensuse) gnc-backend-dbi.c:2105:56: error: 'dbi_data_t' has no member named 'd_datetime'

2014-10-01 Thread Frank H. Ellenberger
Hi all,

with the help of lmat I was able to solve this issue, which prevented me
for a long time from building the code.

Opensuse has libdbi1-0.9.0-2.1.2 in its default 13.1 repos.
Additional exists libdbi3-0.9.0.g32-1.1 in its OBS server:database. Both
can be installed parallel. But you can only install one libdbi-devel. If
you configured the database OBS repo, you can accidentially upgrade your
libdbi-devel package.

While libdbi-devel-2.1.2 has time_t d_datetime;
in dbi_data_t in the /usr/include/dbi/dbi-dev.h, it is
dbi_datetimex d_datetimex; in libdbi-devel-0.9.0.g32-1.1

I hope this prevents others from hours of search,
Frank
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [SOLVED] (opensuse) gnc-backend-dbi.c:2105:56: error: 'dbi_data_t' has no member named 'd_datetime'

2014-10-01 Thread Frank H. Ellenberger
Hi Dominique,

Am 01.10.2014 um 21:50 schrieb Dimstar / Dominique Leuenberger:
> For reference,
> 
> gnucash built for openSUSE Factory and 13.2 (which comes with libdbi3,
> we carry this patch for now:
> 
> Index: gnucash-2.6.3/src/backend/dbi/gnc-backend-dbi.c
> ===
> --- gnucash-2.6.3.orig/src/backend/dbi/gnc-backend-dbi.c
> +++ gnucash-2.6.3/src/backend/dbi/gnc-backend-dbi.c
> @@ -2039,7 +2039,7 @@ row_get_value_at_col_name( GncSqlRow* ro
> dbi_result_t *result = (dbi_result_t*)(dbi_row->result);
> guint64 row = dbi_result_get_currow (result);
> guint idx = dbi_result_get_field_idx (result, col_name) - 1;
> - time64 time = result->rows[row]->field_values[idx].d_datetime;
> + time64 time =
> _dbi_make_datetime(result->rows[row]->field_values[idx].d_datetimex);
> (void)g_value_init( value, G_TYPE_INT64 );
> g_value_set_int64 (value, time);
> }
> 

If we would have different -devel packages, which should report
different versions, the patch could be generalized. I assume, the
problem will appear in other distros earlier or later, too.

What do you think?

Cheers
Frank
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [SOLVED] (opensuse) gnc-backend-dbi.c:2105:56: error: 'dbi_data_t' has no member named 'd_datetime'

2014-10-01 Thread Dimstar / Dominique Leuenberger
On Wed, 2014-10-01 at 21:43 +0200, Frank H. Ellenberger wrote: 
> Hi all,
> 
> with the help of lmat I was able to solve this issue, which prevented me
> for a long time from building the code.
> 
> Opensuse has libdbi1-0.9.0-2.1.2 in its default 13.1 repos.
> Additional exists libdbi3-0.9.0.g32-1.1 in its OBS server:database. Both
> can be installed parallel. But you can only install one libdbi-devel. If
> you configured the database OBS repo, you can accidentially upgrade your
> libdbi-devel package.
> 
> While libdbi-devel-2.1.2 has time_t d_datetime;
> in dbi_data_t in the /usr/include/dbi/dbi-dev.h, it is
> dbi_datetimex d_datetimex; in libdbi-devel-0.9.0.g32-1.1
> 
> I hope this prevents others from hours of search,
> Frank

For reference,

gnucash built for openSUSE Factory and 13.2 (which comes with libdbi3,
we carry this patch for now:

Index: gnucash-2.6.3/src/backend/dbi/gnc-backend-dbi.c
===
--- gnucash-2.6.3.orig/src/backend/dbi/gnc-backend-dbi.c
+++ gnucash-2.6.3/src/backend/dbi/gnc-backend-dbi.c
@@ -2039,7 +2039,7 @@ row_get_value_at_col_name( GncSqlRow* ro
dbi_result_t *result = (dbi_result_t*)(dbi_row->result);
guint64 row = dbi_result_get_currow (result);
guint idx = dbi_result_get_field_idx (result, col_name) - 1;
- time64 time = result->rows[row]->field_values[idx].d_datetime;
+ time64 time =
_dbi_make_datetime(result->rows[row]->field_values[idx].d_datetimex);
(void)g_value_init( value, G_TYPE_INT64 );
g_value_set_int64 (value, time);
}


Cheers,
-- 
Dimstar / Dominique Leuenberger 

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


Re: [SOLVED] (opensuse) gnc-backend-dbi.c:2105:56: error: 'dbi_data_t' has no member named 'd_datetime'

2014-10-01 Thread Dimstar / Dominique Leuenberger
On Wed, 2014-10-01 at 22:29 +0200, Frank H. Ellenberger wrote: 
> Hi Dominique,
> 
> Am 01.10.2014 um 21:50 schrieb Dimstar / Dominique Leuenberger:
> > For reference,
> > 
> > gnucash built for openSUSE Factory and 13.2 (which comes with libdbi3,
> > we carry this patch for now:
> > 
> > Index: gnucash-2.6.3/src/backend/dbi/gnc-backend-dbi.c
> > ===
> > --- gnucash-2.6.3.orig/src/backend/dbi/gnc-backend-dbi.c
> > +++ gnucash-2.6.3/src/backend/dbi/gnc-backend-dbi.c
> > @@ -2039,7 +2039,7 @@ row_get_value_at_col_name( GncSqlRow* ro
> > dbi_result_t *result = (dbi_result_t*)(dbi_row->result);
> > guint64 row = dbi_result_get_currow (result);
> > guint idx = dbi_result_get_field_idx (result, col_name) - 1;
> > - time64 time = result->rows[row]->field_values[idx].d_datetime;
> > + time64 time =
> > _dbi_make_datetime(result->rows[row]->field_values[idx].d_datetimex);
> > (void)g_value_init( value, G_TYPE_INT64 );
> > g_value_set_int64 (value, time);
> > }
> > 
> 
> If we would have different -devel packages, which should report
> different versions, the patch could be generalized. I assume, the
> problem will appear in other distros earlier or later, too.
> 
> What do you think?

It should not matter about parallel installation of the -devel or not:
configure should simply identify which of the two variants are there and
'do the right thing' out of it (I don't think libdbi exports usable
version info in the headers).
I'd go with some test compile of one function, if fails do the other..
then you know which version is there.

IF there is interest in this, I am willing to work on that in the next
couple days (probably tomorrow afternoon)


-- 
Dimstar / Dominique Leuenberger 

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


bypassing finance::quote

2014-10-01 Thread Rafael Lima
Hi everybody,

first of all, i'm rafael brazilian and this is my first interaction
with gnucash mailist sorry if i do anything wrong.


I installed finance::quote and tried to get quotes from ibovespa
market, but even trying diferent tips from diferents websites i
couldn't do.

So, i develop a java program to do it, create a new source quote
module that just call my java code and put it on the library and
everything works fine.

But i hate this situation, i've installed a perl interpreter just for
use this library what doesn't have any function to my [is just a link]


So i looked the code, looking for a hook for try insert my java code,
but how im new at this code and not so expert cpp develop i would like
some help:

1- i found the place where is called the function to check if
finance::quote is installed... but i couldn't understand how it works
LINE 19071 of swig-engine.c [pasted here
http://paste.ofcode.org/38qxqQvM6aGFD3vxaQ2ekHK]

seams that he is looking for something in a directory but what is
exactally? i tried to reproduce the finance::quote directory
estructure in my system and didn't work [maybe i forgot some file]


2-i found where the finance::quote code is called but i didn't
understand the use of scm objects,
LINE 290 of dialog-price-edit-db.c
http://paste.ofcode.org/vwcWBUmDVMqM9VWdUdi5JE

I realize that is a system call and hopefully there are some
enviroiment  variables envolved [so i could change its value and call
my own code =D] but i cant deep understand the code, can anyone help
me?



sorry if i did something inconvenient and for my bad english...


thanks for your attention

I'm using gnucash 2.6.4 on a windows 7

--
--
Rafael Lima
___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel


About the process of migration to C++

2014-10-01 Thread Chenxiong Qi
Hi all,

In the past several days, I've read mails and wiki pages about the migration to 
C++. A quick question is that, is there any place, a wiki page or others, to 
record the process of migration, the todo list, and what is being done?

Regards,
Chenxiong Qi
  

___
gnucash-devel mailing list
gnucash-devel@gnucash.org
https://lists.gnucash.org/mailman/listinfo/gnucash-devel