简体   繁体   English

Libpqxx抱怨缺少参考文献

[英]Libpqxx complaining about missing references

So I have the following problem: 所以我有以下问题:

g++ -std=c++0x -O3 -I/usr/include/scip main.cpp locations/locationreader.cpp locations/locationassigner.cpp scheduler.o optimizer.o dbmanager.o scheduleData.o exam.o  -o main -L/usr/lib -lscip  -lreadline  -lgmp -lz -llpispx  -lsoplex  -lobjscip -lnlpi.cppad -lscipopt -lzimpl -lpqxx -lpq  -pthread
/usr/lib/../lib64/libpqxx.so: undefined reference to `PQescapeIdentifier'
collect2: error: ld returned 1 exit status
make: *** [main] Error 1

And I cannot figure out why it cannot find the reference because I have libpq installed and its right there in /usr/lib64 我无法弄清楚为什么它找不到引用,因为我已经安装了libpq并且它位于/ usr / lib64中

$ ls | grep pq
libpq.so
libpq.so.5
libpq.so.5.2
libpqxx-4.0.so
libpqxx.so

So if I could get any help with this that would be lovely 所以,如果我能得到任何帮助,那将是可爱的

PQescapeIdentifier appeared in PostgreSQL 9.0, which corresponds to libpq.so.5.3 PQescapeIdentifier出现在PostgreSQL 9.0中,对应于libpq.so.5.3

9.0 release notes have this entry: 9.0 发行说明有此条目:

Add libpq functions PQescapeLiteral() and PQescapeIdentifier() (Robert Haas) 添加libpq函数PQescapeLiteral()和PQescapeIdentifier()(Robert Haas)

You seem to use client libraries from PostgreSQL-8.4 ( libpq.so.5.2 ), that would be why it lacks this function. 您似乎使用PostgreSQL-8.4( libpq.so.5.2 )中的客户端库,这就是它缺少此功能的原因。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM