boost::create_directory 在发布模式下返回异常
boost::create_directory returns exception in release mode
>我有以下代码来创建目录。
string path = "\\hilbert\MRoot\2017-05-04"
boost::filesystem::create_directory(path );
当我在调试模式下运行它时,此代码有效,但它在发布模式下给了我一个异常。 发布模式下的异常是"字符串迭代器不兼容">
我正在使用视觉工作室为我的发布和调试模式提供的默认设置。
编辑:我在发布模式下链接到boost_filesystem-vc110-mt-gd-1_60.lib。我将其更改为 boost_filesystem-vc110-mt-1_60.lib,它开始工作。
你使用来自库提升的对象path
例如
using namespace boost::filesystem;
path p{"D:\newDirectory"};
create_directory( p );
相关文章:
- 返回复合模式的复合对象不返回整个对象
- 为什么 c++11 std::normal_distribution 在从函数调用时返回相同的模式?
- boost::create_directory 在发布模式下返回异常
- 如何在另一个线程中关闭 MFC 模式对话框并获取对话框返回值?
- 从C 中的函数中动态分配的缓冲区返回的最佳模式是什么?
- 模式返回伪随机数生成器
- 返回不同类型/类的方法的设计模式
- 将模式包装为 std::begin; 返回 begin(c); 到函数中
- Q::比例高度变换模式返回空图像
- 为什么将boost::move()的返回值分配给非常数引用在C++0x模式下失败,但在C++03模式下有效
- 可能返回值也可能不返回值的函数的迭代器缩减器模式
- 使用具有返回值的访客模式实现 AST 的最佳方法是什么?
- 返回一组数据类型之一的最佳模式
- 工厂函数返回元组的C++11模式
- 如何在不使用非构造函数的方法的情况下应用singleton设计模式来返回类对象
- 这是一个设计模式吗?从setters返回
- 只有在使用消息模式时,GetLastError()才会在调用PeekNamedPipe后返回ERROR_BROKEN_P
- 从访问者模式返回一个值
- 设计模式-在C++中返回对象集合的函数
- 为返回对象和NRVO的方法设计模式