Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | SDKs | SDKs

C Client Library - Problems Compiling(solutions here) and Using(need help) - Visual Studio 2008 (not 2010)

6 replies [Last post]
  • Login or register to post comments
Thu, 05/17/2012 - 11:44
JPelletier
Offline
Joined: 05/17/2012
Groups: None

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?

Top
  • Login or register to post comments
Tue, 09/18/2012 - 17:38
Haster
Offline
Joined: 09/16/2012
Groups: None

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...

Top
  • Login or register to post comments
Tue, 09/18/2012 - 17:40
ingenthr
Offline
Joined: 03/16/2010
Groups:

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.

Top
  • Login or register to post comments
Tue, 09/18/2012 - 17:44
JPelletier
Offline
Joined: 05/17/2012
Groups: None

Hi Haster,

Sorry but I can't help you, I've not played with Couchbase since May.

Good Luck!

Top
  • Login or register to post comments
Thu, 01/10/2013 - 12:43
Haster
Offline
Joined: 09/16/2012
Groups: None

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

Top
  • Login or register to post comments
Tue, 01/22/2013 - 06:58
tgrall
Offline
Joined: 09/05/2012
Groups: None

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

__________________

Tug
@tgrall

Top
  • Login or register to post comments
Wed, 01/23/2013 - 04:16
Haster
Offline
Joined: 09/16/2012
Groups: None

Makefile for building with Visual Studio 2008 could be taken from here:
http://www.couchbase.com/issues/secure/attachment/16181/NMakefile_new

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker