PDA

View Full Version : how to read .dbf-Files?



nernst
25th May 2014, 14:42
Hi All,

i need to get on with .dbf-Files (dBase IV). I found the library on https://code.google.com/p/qdbf/. But when i try to implement it in my project, I get a lot of errors.
When I only write the part: QDbf::QDbfTable table;

and compile it, I get the followoing Errors:


In function `ZN7layout1C2EP7QWidget':
undefined reference to `_imp___ZN4QDbf9QDbfTableC1Ev'
undefined reference to `_imp___ZN4QDbf9QDbfTableD1Ev'

and so on (these are 140Errors)

Did anyone had the same problem?

Can anyone help me reading the *.dbf-Files?

Thanks

anda_skoa
25th May 2014, 20:03
Have you added the library to the LIBS variable in your .pro file?

Cheers,
_

folibis
26th May 2014, 00:36
yes, as anda_skoa says you include *.h files in your project but not link it with library itself.
or you can include all files from dbf folder. I use dbf library in this way in one of my projects https://github.com/folibis/qsimplespatial

nernst
26th May 2014, 13:25
Hi,
thanks for your suggests.

@anda_skoa: I think this might be the problem. I didn't add the libraries, but also because I don't know how and which of the files the libraries are. :o

@folibis: I tried to add simply all files of the dbf-folder, but had the same problem with the references.

I'll look at folibis' project and hopefully it will help me.

Added after 1 25 minutes:

Hi,

now it works. Thank you so much for your helpful answers.

I just had to add the include of the qdbf in the *pro-File and make a clear of the project, so that the moc-Files were remade. Now I can read my DBF-Files.

What a nice monday :