小编Abh*_*hay的帖子

使用boost库构建C++/Tcl程序时出现"模糊符号错误"

我已经阅读了这里给出的指南和 http://cpptcl.sourceforge.net/doc/compiling.html因此我已经完成了基本的东西.

这是C++/Tcl中提供的指南中给出的Hello.cc的代码:

#include "cpptcl.h" 
#include <iostream>

using namespace std;

void hello()
{
     cout << "Hello C++/Tcl!" << endl;
}

CPPTCL_MODULE(Mymodule, i)
{
     i.def("hello", hello);
}
Run Code Online (Sandbox Code Playgroud)

根据指南,我们需要cpptcl.h和cpptcl.cc以及我所包含的详细/目录中的其他几个文件.

在构建代码时,它给出了以下错误:

1>Compiling...
1>cpptcl.cc
cpptcl.cc(35) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
cpptcl.cc(325) : error C2039: 'what' : is not a member of 'boost::exception'
1>        c:\program files\boost\boost_1_44_0\boost\exception\exception.hpp(194) : see declaration of 'boost::exception'
1>cpptcl.cc(366) : error C2872: 'exception' : ambiguous symbol
1>        could be …

c++ boost

3
推荐指数
1
解决办法
2642
查看次数

标签 统计

boost ×1

c++ ×1