QOF won't link

Derek Atkins warlord at MIT.EDU
Wed Jun 16 16:09:44 EDT 2004

Neil Williams <linux at codehelp.co.uk> writes:

> What do I need in a Makefile.am to deal with these error reports:
> /opt/neil/gnucash/src/import-export/gnc-book-merge/gnc_book_merge.c:114: 
> undefined reference to `qof_sql_query_run'
> gnc_book_merge.o(.text+0x100): In function `gnc_book_merge_do_some_queries':
> /opt/neil/gnucash/src/import-export/gnc-book-merge/gnc_book_merge.c:134: 
> undefined reference to `qof_sql_query_new'
> gnc_book_merge.o(.text+0x10e):/opt/neil/gnucash/src/import-export/gnc-book-merge/gnc_book_merge.c:137: 
> undefined reference to `qof_sql_query_set_book'
> gnc_book_merge.o(.text+0x130):/opt/neil/gnucash/src/import-export/gnc-book-merge/gnc_book_merge.c:157: 
> undefined reference to `qof_sql_query_destroy'
> collect2: ld returned 1 exit status
> make: *** [gnc_book_merge] Error 1
> I can't find any suitable libraries in the CVS HEAD src/ tree.
> or with -lqof added:

Gnucash does not depend on -lqof, and indeed having -lqof installed on
your machine may screw up your gnucash build if it finds the wrong
version of header files.  Nor do I get this error when I build CVS
HEAD, so it's something you did yourself (or it's pulling in the wrong
QOF headers and getting confused).

These symbols are declared in src/engine/qofsql.h but that file is not
compiled in the gnucash build -- which leads me to believe you're
having the version-skew problem that I alluded to.  Try removing
libqof from your machine so gnucash doesn't find the wrong header

> This QOF still isn't making any sense and neither of the examples on the QOF 
> sourceforge site will compile.
> (there's no my-object.h file)
> sql-example.c:48: error: `MyObj' undeclared (first use in this function)

Are you looking at QOF or Gnucash?  This is not the right place to ask
QOF questionbs.

       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available

More information about the gnucash-devel mailing list