Hey guys,

I have to read out a .dbf-file (I know, it's very old, but the files are still used in this case and my App has to import them).
Via google, I have found the Library "QDbf" (http://code.google.com/p/qdbf/) and tested it under Mac OS X and everything works perfect.
Then, I tried to compile it under Windows (7) with MinGW, because the App will be mainly used under Windows. But I get lots of Warnings and a strange Error:
Qt Code:
  1. definition of static data member 'QDbf::QDbfTableModel::staticMetaObjectExtraData' of dllimport'd class
To copy to clipboard, switch view to plain text mode 
in "moc_dbftablemodel.cpp".

My example-Code, I tried to compile is:

Qt Code:
  1. #include "qdbftable.h"
  2. #include "qdbfrecord.h"
  3. #include <QtGui>
  4.  
  5. int main(int argv, char **args)
  6. {
  7.  
  8. QApplication app(argv, args);
  9.  
  10. QTextEdit textEdit;
  11. textEdit.show();
  12.  
  13. QDbf::QDbfTable table;
  14. if (!table.open("datei.dbf")) {
  15. qDebug() << "file open error";
  16.  
  17. }
  18.  
  19. QString output;
  20.  
  21. while (table.next()) {
  22.  
  23. QDbf::QDbfRecord record = table.record();
  24. for (int i = 0; i < record.count(); ++i) {
  25.  
  26. if(!(record.value(i).toString().trimmed()==""))
  27. {
  28. if(record.fieldName(i)=="NAME")
  29. {
  30. output.append(record.fieldName(i));
  31. output.append(QLatin1String(": "));
  32. output.append(record.value(i).toString().trimmed());
  33. output.append(QLatin1String("; \n"));
  34. }
  35. if(record.fieldName(i)=="PRENAME")
  36. {
  37. output.append(record.fieldName(i));
  38. output.append(QLatin1String(": "));
  39. output.append(record.value(i).toString().trimmed());
  40. output.append(QLatin1String("; \r \n"));
  41. }
  42. }
  43.  
  44. }
  45. qDebug() << output;
  46. }
  47.  
  48. table.close();
  49. textEdit.setText(output);
  50.  
  51. return app.exec();
  52.  
  53. }
To copy to clipboard, switch view to plain text mode 

The Header/Source-Files are in the same directory with the main.cpp.

And now my Questions:
- How do I import a class correctly in my Qt environment? Have the Lib to be integrated, or is it enough to copy it in the Dir with my other sourcefiles?
- Can I import it as a .dll? Because the Example in the QDbf-Package compiles correctly under Windows/MinGw and creates a .dll and .a-File. When I include it via "LIBS += ..." in my .pro-file, nothing happens. How do I include it correctly and use the functions of the dll in my Code?

Hope you can help me getting this to run!

Greetings, Julian