c++ - 当我尝试进行 TPC-E 测试时,Make 实用程序提示 "undefined reference"

标签 c++ makefile debian ld tpc

<分区>

这个问题因我远离编程而变得更加复杂。

我需要使用TPC-E测试。我从他们的website 下载了源代码.

有一个悲惨且几乎毫无意义的自述文件。 以下是其内容:

To use the Makefile you must first set the following environment variables 
to match your system and compiler requirements:

CXX: path and name of compiler
    ex: export CXX=/opt/SUNWspro/bin/CC  (C++ compiler on Solaris)
CCFLAGS: compiler options
    ex: export CCFLAGS="-g -O"  
        -g enable debug
        -O optimize code
LDFLAGS: linker/loader options
    ex: export LDFLAGS="-g"
LIBS: extra libraries to link in
    ex: export LIBS="-lpthread"

根据那里的说明,我创建了必要的环境变量(我刚刚从 CCFLAGS 变量中删除了 -g 开关)。之后,我运行了 make 实用程序,发现了五千多行错误。显然他缺少一些图书馆。我的知识到此为止。

以下是收到的一些错误消息:

...

/usr/bin/ld: DateTime.o: in function `TPCE::CDateTime::Validate(int, int, int, int, int, int, int)': DateTime.cpp:(.text+0xee): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream(std::_Ios_Openmode)'
/usr/bin/ld: DateTime.cpp:(.text+0xfd): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
/usr/bin/ld: DateTime.cpp:(.text+0x107): undefined reference to `__cxa_allocate_exception'
/usr/bin/ld: DateTime.cpp:(.text+0x117): undefined reference to `std::__cxx11::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> >::str() const'
/usr/bin/ld: DateTime.cpp:(.text+0x122): undefined reference to `std::out_of_range::out_of_range(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: DateTime.cpp:(.text+0x135): undefined reference to `operator delete(void*)'

...

/usr/bin/ld: error.cpp:(.text._ZN4TPCE10CSystemErrD0Ev[_ZN4TPCE10CSystemErrD5Ev]+0x24): undefined reference to `std::exception::~exception()'
/usr/bin/ld: error.cpp:(.text._ZN4TPCE10CSystemErrD0Ev[_ZN4TPCE10CSystemErrD5Ev]+0x31): undefined reference to `operator delete(void*, unsigned long)'
/usr/bin/ld: error.o: in function `TPCE::CSystemErr::~CSystemErr()':error.cpp:(.text._ZN4TPCE10CSystemErrD2Ev[_ZN4TPCE10CSystemErrD5Ev]+0x1c): undefined reference to `operator delete(void*)'

...

/usr/bin/ld: locking.cpp:(.text+0x1fb): undefined reference to `operator delete(void*)'
/usr/bin/ld: locking.cpp:(.text+0x202): undefined reference to `std::runtime_error::~runtime_error()'
/usr/bin/ld: locking.cpp:(.text+0x209): undefined reference to `typeinfo for std::runtime_error'
/usr/bin/ld: locking.cpp:(.text+0x211): undefined reference to `__cxa_throw'
/usr/bin/ld: locking.o: in function `TPCE::CMutex::lock()':locking.cpp:(.text+0x246): undefined reference to `std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> >::basic_ostringstream(std::_Ios_Openmode)'

...

在互联网上搜索让我想到安装 libboost-all-dev 包,但那没有帮助。最后,我放弃了——我完全不懂术语,也没有时间学习 C++ 编程。

操作系统 - Debian 10

问题:需要安装哪些库,有没有人用过这些测试,如何适配PostgreSQL?

Full error log (892 230 bytes)

最佳答案

我换了

export CXX=/usr/bin/gcc

export CXX=/usr/bin/c++

关于c++ - 当我尝试进行 TPC-E 测试时,Make 实用程序提示 "undefined reference",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59154834/

相关文章:

c++ - 在 QtCreator 中添加静态 .a 库

C++:引用作为返回值

c++ - 构建成功时 Eclipse (CDT) 中的可疑错误消息

makefile - GNU Makefile 中的 For 循环——将所有目标文件收集到多个目录中的一个变量中

c++ - 通用 makefile 显示没有规则生成目标错误

javascript - Android OS/iOS/debian linux 中的事件(单击 Enter 键)

c++ - 使用 DLL 和 C/C++ 遇到断点时的不同结果

c - 按照基本示例构建 .c 文件来创建驱动程序将不起作用

linux - emacs23 到 emacs24 : imap shell "Opening nnimap server...failed: Pseudo-terminal will not be allocated ..."

docker - 如何处理临时 apt-key adv 故障?