我是airospike的新手并且已经习惯了。现在我已经按照他们在文档中描述的那样安装了C客户端库。
这是我的代码 Test.c
这是我编译它时出错的错误。 Error
我在这里假设链接器以某种方式无法将aerospike客户端的功能连接到我的代码。我无法理解如何解决它!
答案 0 :(得分:1)
以下是我在Ubuntu VM中使用C Client的说明,Aerospike服务器也安装在此VM中并运行。
Using eclipse to develp C code:
sudo apt-get install eclipse eclipse-cdt g++
Note: C Client does not support AsuRM processors.
I am working inside a Ubuntu 16.04 VM.
$lsb_release -a ⇒ shows my ubuntu version
pgupta@ubuntu:/var/log/aerospike$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial
Required library:
$cd ~
$sudo apt-get install libssl-dev
Download C Client and install for Ubuntu 16.x: http://www.aerospike.com/docs/client/c/install
It was downloaded in my ~/Downloads directory.
$cd Downloads/
$ls
$tar xvf aerospike-client-c-4.1.1.ubuntu16.04.x86_64.tgz
$cd aerospike-client-c-4.1.1.ubuntu16.04.x86_64/
$ sudo dpkg -i aerospike-client-c-devel-4.1.1.ubuntu16.04.x86_64.deb
$ cd examples
$ make
$cd basic_examples/
$cd put
$cd target/
$ sudo service aerospike start (I have a server running in my ubuntu 16 VM)
$./example
Output shows I was able to read and write records to the server.