gpt4 book ai didi

c - 使用 aerospike 客户端库编译 C 程序时体系结构 x86_64 的 undefined symbol

转载 作者:行者123 更新时间:2023-11-30 19:07:07 33 4
gpt4 key购买 nike

我是 aerospike 的新手,刚刚习惯它。现在我已经安装了 C 客户端库,正如他们在文档中所描述的那样。

这是我的代码 Test.c

这是我编译它时遇到的错误。 Error

我在这里假设链接器无法将 aerospike 客户端的功能连接到我的代码。我不明白如何解决它!

最佳答案

以下是我在 Ubuntu VM 中使用 C 客户端的笔记,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.

关于c - 使用 aerospike 客户端库编译 C 程序时体系结构 x86_64 的 undefined symbol ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47081200/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com