ChinaUnix.net
相关文章推荐:

boost linux下使用

载后源码用Easy Build and Install ./configure --prefix=/usr/local/ --without-icu 之后抄了个文档的上一个例子,编译链接都没有问题,运行后直接出现 Segmentation fault 我用的系统是 Fedora core 7 gcc-4.1.2 [ 本帖最后由 helor 于 2007-10-25 12:54 编辑 ]

by helor - C/C++ - 2007-10-26 08:29:12 阅读(3070) 回复(4)

相关讨论

试用boost,参照网上的资料输入如程序,但是进行编译g++ filename.cpp不通过. #include #include<boost/regex.hpp> #include int main() { boost::regex reg4("[^13579]"); std::string s="0123456789"; boost::sregex_iterator it(s.begin(),s.end(),reg4); boost::sregex_iterator end; while (it!=end) std::cout << *it++; } 我的系统是fedora 9,请问是什么问题?

by zhuyubei - C/C++ - 2008-12-11 11:12:28 阅读(6178) 回复(15)

boost python在VC使用 环境:windows 2000/XP,VC6/VS2005, python2.51, boost1.34.1 安装:选择相应VC版本的boost安装程序,如想同时支持VC6和VS2005需对源码编译(这个网上资料很多); 使用VC编译C++扩展 1)VS2005: a.创建一个默认MFC Dll项目; b.清除所有默认创建的源文件和资源文件;(不是必要的) c.修改工程属性: C/C++中【不使用预编译头】【不启用最小重新生成】 Link 中...

by yuntinghill - Python文档中心 - 2008-04-14 23:25:34 阅读(2036) 回复(0)

顺便问一,我每次启动都要root手动mount一,这种命令写在什么地方,可以启动自动去RUN。 刚刚接触linux几天,问题比较弱,大家多多包含。

by CcFaN_cn - C/C++ - 2004-11-02 14:37:51 阅读(2752) 回复(0)

单独编译了regex,生成了libboost_regex-gcc-1_34.a,现在试验regex能否生效,代码如: [code] #include<boost/regex.hpp> int main(int argc,char * argv[]) { boost::regex e("test"); return 0; } [/code] #g++ regex.cpp -I /path/to/boostroot -L/path/to/libboost_regex-gcc-1_34.a -o regex 报错: /tmp/ccf4WLI8.o(.gnu.linkonce.t._ZN5boost11basic_regexIcNS_12regex_traitsIcNS_16cpp_regex_traits...

by terry8416 - C/C++ - 2007-12-29 14:27:47 阅读(5560) 回复(7)

//我想定义类似面的concept //c++伪码 //头文件中 template struct MyConcept{     int fn1(void);     double fn2(void); }; template void fn(void){     boost_CONCEPT_ASSERT((MyConcept)) } struct Impl1{     int fn1(void);     double fn2(void); }; struct Impl2{   ...

by aestheticscj - C/C++ - 2009-04-03 18:55:27 阅读(974) 回复(0)

class A{ public: int type; double da; int ib; }; class B:public A{ public: string c; }; main(){ vector<boost::Any> v; A aa; aa.da = 1.1; aa.ib = 2; aa.type = 0; B bb; bb.da = 11.11; bb.ib = 22; bb.c = "hello"; bb.type = 1; boost::Any any = aa; v.push_back(any); boost::Any any1 = bb; v.push_back(any1); for(vector<boost::Any>::iterator it = v.begin();it != v.end();it...

by jchc - C/C++ - 2008-12-24 12:57:08 阅读(1587) 回复(2)

本文转自: http://blog.csdn.net/auding1900/archive/2005/07/22/431957.aspx 首先,编译boost_python.dll: 在目录$(boostDIR)\libs\python\build\VisualStudio,有vc的工程文件boost_python.dsw,用VS 2005打开它。添加include file,Library files路径,然后就可以编译 接来,编译tutorial中的hello.cpp,就是 >>import hello >>hello....

by linxh - Python文档中心 - 2007-01-16 02:35:37 阅读(1368) 回复(0)

如题,boost库中,容器最大能有多大呢 我目前使用一个python的3D绘图库,该库使用boost编写,最坏情况,要绘制128×128×128个立方体,(绘制后这些立方体不释放) 程序运行一段时间后会死掉,目前怀疑是因为boost或者C++的容器崩溃了

by reiase - C/C++ - 2008-10-18 16:27:43 阅读(1549) 回复(1)

使用 boost.Python 嵌入 Python 模块到 C++ boost.Python 目前并没有提供完整的将 Python 模块嵌入到 C++ 的包装库, 因此许多工作我们还必须通过 Python C API 来进行。 但是, 利用 boost.Python 中提供的一些模块, 能够给我们的工作带来极大便利。 1 修改模块加载路径,装入 Python 模块 与任何一个其它 Python 嵌入 C/C++ 的程序一样, 我们需要在第一条 #include 语句处含入 Python.h, 并在程序开始时调用 Py_Initialize(),...

by YuanXU - Python文档中心 - 2006-09-05 11:08:33 阅读(1881) 回复(0)

boost::any 在跨模块使用时,难道有BUG? 在我的一个DLL里,有一个类如: class MyClass { ... boost::any m_var; } 在DLL被装载的时候会new 一个MyClass(比如pMyClass), 卸载DLL时会 delete 掉它。 另外DLL有一个接口,如: void SetVar(boost::any & anyValue) { pMyClass->;m_var = anyValue; } 运行效果: 当程序退出,卸载DLL,delete pMyClass时会出错。错误的地点是boost::any的析构函数,如: ... clas...

by palzhou - C/C++ - 2004-08-15 21:05:58 阅读(820) 回复(0)