PDA

View Full Version : Cassandra DB using libQtCassandra



kalwi
6th February 2013, 16:24
Hi,
can You help me with compilling and installing these driver for Appache Cassandra DB and Qt 5.0.1 on Windows 7? I don't know how to do it and on the manufacturer's website does not have anything specific. Link: http://snapwebsites.org/project/libqtcassandra

ChrisW67
6th February 2013, 20:57
What libQtCassandra prerequisites have you installed? How have you tried to built it? What was the result?

kalwi
9th February 2013, 20:05
Yes, i try built 0.4.7 version, however I get a message that the file TProcessor.h is missing. I read on the website of the project, but there is nothing concrete.

I also have a problem because I get the message: "Building C + + Library ......... : No". Any ideas?

ChrisW67
10th February 2013, 00:03
The TProcessor.h file is part of the bundled libThrift: see the 3rdParty folder. It looks like the thrift-0.8.0.tar.gz file has been double gzipped so the build process cannot unpack it with 'tar'. Try:


$ cp thrift-0.8.0.tar.gz thrift-0.8.0.tar.gz.orig
$ gunzip thrift-0.8.0.tar.gz
$ mv thrift-0.8.0.tar thrift-0.8.0.tar.gz

and then build again. If that fixes it please tell the libQtCassandra developer.

kalwi
10th February 2013, 07:53
Nothing. The problem still exists. In my case, thrift is extracted so it is not this.

kalwi
11th February 2013, 11:07
I've installed libboost. That solved problem.

I was able to compile these libraries and at the end I got a package with source files and the library libQtCassandra.so. How do I include libQtCassandra.so to Qt and how to do it properly under Windows, because I wanted to use these libraries for Windows.

ChrisW67
11th February 2013, 21:59
A libQtCassandra built on Linux is not useful in Windows. You need to build it on Windows and get a Windows DLL etc.

Declaring Other Libraries. This has also been covered many times in these forums for other thiid-prty libraries like OpenCV.

kalwi
15th February 2013, 08:44
I'm closed libQtCassandy topic, because I'm wrote the mail to the developers of this project and they rewrote that the library should work on Windows, but running it on Windows requires a lot of work.

I found another way to connect c++ program to Cassanda. Looks in this page: http://thrift.apache.org/ Cassandra/interface/cassandra.thrift after generate contains set of classes and objects to Cassandra. Then I'm used the Cygwin to compile Thrift, hence I have the header files for Windows. Then I'm downloaded the Boost library and copied these files to the Thrift sources and compiled libthrift.lib using MSVC. And then I'm compiled the two files *. lib with same boost files. Then I'm included *.lib files for Qt project. A header files I've connected like in this page: http://wiki.apache.org/cassandra/ThriftExamples#C.2B-.2B-.

Everything looks good. The program connects to the database - when the server is down program throws exceptions. But, in this line:

CassandraClient cass(p);
I get 43 errors: "unresolved external symbol ..." and all involve methods from CassandraClient object. The declarations of these methods are in Cassandra.h file and in Cassandra.cpp their definitions. I don't know why it didn't see these definitions.