Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
包含z3+时出错+;。H 我使用Z3定理证明器,我安装了Z3,然后在我的C++程序中包含了Z3++.h,但是当我编译时,我得到以下错误: /tmp/ccVlHDDf.o: In function `z3::context::check_error() const': engine.cpp:(.text._ZNK2z37context11check_errorEv[z3::context::check_error() const]+0x11): undefined reference to `Z3_get_error_code' engine.cpp:(.text._ZNK2z37context11check_errorEv[z3::context::check_error() const]+0x3c): undefined reference to `Z3_get_error_msg_ex' /tmp/ccVlHDDf.o: In function `z3::ast::ast(z3::context&, _Z3_ast*)': engine.cpp:(.text._ZN2z33astC2ERNS_7contextEP7_Z3_ast[_ZN2z33astC5ERNS_7contextEP7_Z3_ast]+0x43): undefined reference to `Z3_inc_ref' /tmp/ccVlHDDf.o: In function `z3::cast_ast<z3::expr>::operator()(z3::context&, _Z3_ast*)':_Z3 - Fatal编程技术网

包含z3+时出错+;。H 我使用Z3定理证明器,我安装了Z3,然后在我的C++程序中包含了Z3++.h,但是当我编译时,我得到以下错误: /tmp/ccVlHDDf.o: In function `z3::context::check_error() const': engine.cpp:(.text._ZNK2z37context11check_errorEv[z3::context::check_error() const]+0x11): undefined reference to `Z3_get_error_code' engine.cpp:(.text._ZNK2z37context11check_errorEv[z3::context::check_error() const]+0x3c): undefined reference to `Z3_get_error_msg_ex' /tmp/ccVlHDDf.o: In function `z3::ast::ast(z3::context&, _Z3_ast*)': engine.cpp:(.text._ZN2z33astC2ERNS_7contextEP7_Z3_ast[_ZN2z33astC5ERNS_7contextEP7_Z3_ast]+0x43): undefined reference to `Z3_inc_ref' /tmp/ccVlHDDf.o: In function `z3::cast_ast<z3::expr>::operator()(z3::context&, _Z3_ast*)':

包含z3+时出错+;。H 我使用Z3定理证明器,我安装了Z3,然后在我的C++程序中包含了Z3++.h,但是当我编译时,我得到以下错误: /tmp/ccVlHDDf.o: In function `z3::context::check_error() const': engine.cpp:(.text._ZNK2z37context11check_errorEv[z3::context::check_error() const]+0x11): undefined reference to `Z3_get_error_code' engine.cpp:(.text._ZNK2z37context11check_errorEv[z3::context::check_error() const]+0x3c): undefined reference to `Z3_get_error_msg_ex' /tmp/ccVlHDDf.o: In function `z3::ast::ast(z3::context&, _Z3_ast*)': engine.cpp:(.text._ZN2z33astC2ERNS_7contextEP7_Z3_ast[_ZN2z33astC5ERNS_7contextEP7_Z3_ast]+0x43): undefined reference to `Z3_inc_ref' /tmp/ccVlHDDf.o: In function `z3::cast_ast<z3::expr>::operator()(z3::context&, _Z3_ast*)':,z3,Z3,在z3_api.h中。但我不确定是调用了它还是声明了函数。有人能帮忙吗。这是一个链接错误。您使用的命令行是什么? 如果在系统中安装了Z3 include文件和库,则在链接应用程序时应包括选项-lz3。如果Z3库不在标准目录中,您也应该使用-L我按照Z3网站上提到的方式安装了它。根据它,库安装在/usr/lib中,但我不能在这里找到Z3文件夹,尽管我在/usr/binA中有一个可执行文件,但不会创建Z3文件夹。sudo make install命令将可执行文件复制到/usr/bin,将包含文件复制

在z3_api.h中。但我不确定是调用了它还是声明了函数。有人能帮忙吗。

这是一个链接错误。您使用的命令行是什么?
如果在系统中安装了Z3 include文件和库,则在链接应用程序时应包括选项
-lz3
。如果Z3库不在标准目录中,您也应该使用
-L

我按照Z3网站上提到的方式安装了它。根据它,库安装在/usr/lib中,但我不能在这里找到Z3文件夹,尽管我在/usr/binA中有一个可执行文件,但不会创建Z3文件夹。
sudo make install
命令将可执行文件复制到
/usr/bin
,将包含文件复制到
/usr/include
,将库复制到
/usr/lib
。配置Z3(即生成Z3生成文件)时,可以修改前缀
/usr
Z3_error_code Z3_API Z3_get_error_code(__in Z3_context c);