MonetDB客户端编译 [英] MonetDB client compilation

查看:102
本文介绍了MonetDB客户端编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是数据库社区的初学者。我一直在尝试使用C / C ++ MAPI 与MonetDB进行交互。我已经在Ubuntu 14.04 LTS计算机上安装了MonetDB,并且当我尝试从在这里,出现以下错误:

I'm a beginner in the Database community. I have been trying to interface with MonetDB using C/C++ MAPI. I have installed MonetDB on my Ubuntu 14.04 LTS machine and when I try to compile a sample program from here, I get the following error:

$ gcc test.c -I /usr/include/monetdb -lmapi




test.c :(。text + 0x29):未定义引用 mapi_explain_query'
test.c :(。text + 0x35):未定义引用
mapi_result_error'
test.c :(。text + 0x50):未定义对 mapi_explain_result'
test.c :(。text + 0x5c):未定义对
mapi_next_result'
test.c :( .text + 0x6d):未定义引用 mapi_close_handle'
test.c :(。text + 0x79):未定义引用
mapi_destroy'
测试。 c :(。text + 0x98):未定义引用 mapi_explain'
test.c :(。text + 0xa4):未定义引用
mapi_destroy'
/tmp/cctyQopc.o:在函数中n query':
test.c :(。text + 0xf9):未定义引用
mapi_query'
test.c :(。text + 0x110 ):对 mapi_error'
/tmp/cctyQopc.o的未定义引用:在函数中
update':
test.c :(。text + 0x160) :对 mapi_close_handle'的未定义引用'
/tmp/cctyQopc.o:在函数中
main':
test.c :(。text + 0x1b6):未定义引用 mapi_connect'
test.c :(。text + 0x1c6):未定义引用
mapi_error'
test.c :(。text + 0x238):未定义引用 mapi_fetch_field'
test.c :(。text + 0x24d):未定义引用
mapi_fetch_field'
test.c :( .text + 0x277):未定义引用 mapi_fetch_row'
test.c :(。text + 0x287):未定义引用
mapi_close_handle'
测试。 c :(。text + 0x293):对`mapi_destroy'
collect2的未定义引用:错误:ld返回了1个退出状态

test.c:(.text+0x29): undefined reference to mapi_explain_query' test.c:(.text+0x35): undefined reference tomapi_result_error' test.c:(.text+0x50): undefined reference to mapi_explain_result' test.c:(.text+0x5c): undefined reference tomapi_next_result' test.c:(.text+0x6d): undefined reference to mapi_close_handle' test.c:(.text+0x79): undefined reference tomapi_destroy' test.c:(.text+0x98): undefined reference to mapi_explain' test.c:(.text+0xa4): undefined reference tomapi_destroy' /tmp/cctyQopc.o: In function query': test.c:(.text+0xf9): undefined reference tomapi_query' test.c:(.text+0x110): undefined reference to mapi_error' /tmp/cctyQopc.o: In functionupdate': test.c:(.text+0x160): undefined reference to mapi_close_handle' /tmp/cctyQopc.o: In functionmain': test.c:(.text+0x1b6): undefined reference to mapi_connect' test.c:(.text+0x1c6): undefined reference tomapi_error' test.c:(.text+0x238): undefined reference to mapi_fetch_field' test.c:(.text+0x24d): undefined reference tomapi_fetch_field' test.c:(.text+0x277): undefined reference to mapi_fetch_row' test.c:(.text+0x287): undefined reference tomapi_close_handle' test.c:(.text+0x293): undefined reference to `mapi_destroy' collect2: error: ld returned 1 exit status

此问题先前已被问过此处,答案并不能解决问题(尽管答案已被接受,但我不确定为什么)。任何帮助/指导都将非常有用!

This question has previously been asked here and the answer did not solve the problem (although the answer was accepted, I'm not sure why). Any help/directions would be great!

推荐答案

在Ubuntu 18.04上,使用:

On Ubuntu 18.04 using:

pkg-config --libs monetdb-mapi和pkg-config --cflags monetdb-mapi

pkg-config --libs monetdb-mapi and pkg-config --cflags monetdb-mapi

不起作用,因为Ubuntu没有bzip2。 pc:

Won't work because Ubuntu doesn't have a bzip2.pc:

这里是如何工作的:

gcc main.c -I / usr / include / monetdb- lmapi -lssl -lcrypto -lstream -lcurl -llzma -lbz2

gcc main.c -I /usr/include/monetdb -lmapi -lssl -lcrypto -lstream -lcurl -llzma -lbz2

这篇关于MonetDB客户端编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆