2017-11-02 28 views
-1

저는 aerospike를 처음 접했고 익숙해졌습니다. 이제는 C 클라이언트 라이브러리를 설명서에 설명 된대로 설치했습니다.Aerospike 클라이언트 라이브러리를 사용하는 동안 C 프로그램을 컴파일 할 때 x86_64 아키텍처가 정의되지 않았습니다.

여기에 내 코드 Test.c

입니다 그리고 이것은 내가 그것을 컴파일에 얻을 오류입니다. Error

링커가 aerospike 클라이언트의 기능을 내 코드에 연결할 수 없다고 가정합니다. 나는 그것을 해결하는 방법을 이해할 수 없다!

+0

다른 사람들이 쉽게 시도 할 수 있도록 질문에 코드를 붙여주십시오. – sahaj

+0

코드의 텍스트를 복사하여 붙여 넣은 다음 스크린 샷 대신 오류가 발생하는 것이 좋습니다. – Iguananaut

+0

오픈 소스 코드를 사용하고 있습니다. 잘 쓰여진 버그 보고서를 열어서 기여할 수 있습니다. https://github.com/aerospike/aerospike-client-c/issues –

답변

0

나는 aerospike를 사용하지는 않았지만 필요한 라이브러리를 링크하는 데 필요한 정보를 제공하는 make 파일을 포함하는 예제 중 하나를 시작하는 것이 좋습니다. 링커가 기호를 해석하지 않는 이유 인 aerospike 라이브러리가 빌드 단계에 보이지 않습니다.

1

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 

[email protected]:/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.