C Client Library - Problems Compiling(solutions here) and Using(need help) - Visual Studio 2008 (not 2010)
Hi,
I'm new to Couchbase and I tried to compile both libcouchbase-1.0.3 and libvbucket-1.8.0.3 with Visual Studio 2008 (I don't have 2010 yet at work). Here is a list of problems I got when Compiling:
Compiling
==========
1- NMakefile is missing in archived libvbucket 1.8.0.3
From the C Client Library page, there is a link for the source archive but nmakefile is missing. I used the "current" version (libvbucket-1.8.0.3-5) from github instead.
2- Compiling libcouchbase-1.0.3 - File stdint.h is missing in Visual Studio 2008
Easy to fix, just download the file and put it under /src: http://msinttypes.googlecode.com/svn/trunk/stdint.h
Using
==========
I made a really simple program based on the example, but when I connect, I always have the error "Connection failure: Connection failed: Invalid argument" after:
libcouchbase_error_t resultConnect = libcouchbase_connect(instance); libcouchbase_wait(instance);
I found that if I put a Sleep of 1 millisecond between the connect and the wait, it work :S
libcouchbase_error_t resultConnect = libcouchbase_connect(instance); Sleep(1); libcouchbase_wait(instance);
I have the exact same behavior with my loop of 100 libcouchbase_store. I must put a Sleep(1); after each call to store or the result is a lot of Failure.
if (resultConnect == LIBCOUCHBASE_SUCCESS) { libcouchbase_set_storage_callback(instance, storage_callback); for (int ii = 0; ii < 1000; ++ii) { char key[80]; size_t nkey = sprintf(key, "%d", ii); libcouchbase_store(instance, NULL, LIBCOUCHBASE_SET, key, nkey, &ii, sizeof(ii), 0, 0, 0); Sleep(1); } // Wait for all of them to complete libcouchbase_wait(instance); }
Any idea?
That doesn't immediately make sense, no. I don't think we've seen this before.
Let me see if we can get you some binaries.
Hi Haster,
Sorry but I can't help you, I've not played with Couchbase since May.
Good Luck!
I resolved my problem.
The root of issue was that mainfest file was not added to dll library.
If someone need Makefile for building libcouchbase by Wisual Studio 2008 I can share it
Hello,
If you do not mind it will be great to share that in the forum to allow people to find the solution here.
Regards
Makefile for building with Visual Studio 2008 could be taken from here:
http://www.couchbase.com/issues/secure/attachment/16181/NMakefile_new
JPelletier, Hello!
Now I'm trying to build libvbucket on Visual Studio 2008. Build process finished without errors, but when I try
to start vbuckettool.exe it finished with error:
Runtime Error:
Program ...
R6034
An application has made an attempt to load the C runtime library incorrectly.
Please contact the application's support team for more information
Did you have such problem?
I can't understand what is the problem...