正在链接提升内存映射文件
Linking boost memory mapped files
我有一个在linux Debian上启动的程序,所以在那里链接很容易。我所要做的就是命令行:
LIBS += -lboost_system -lboost_iostreams
现在我必须在Windows上编译相同的程序。我下载了boost版本1.58,然后执行了bootstrap
和bjam
。这编译了boost并创建了包含所有库的stage
文件夹。
现在我正在使用内存映射文件类boost::iostreams::mapped_file_source()
,所以我得到了多个链接错误,我举了一个例子:
FileCheck.obj:-1: error: LNK2019: unresolved external symbol "public: char const * __cdecl boost::iostreams::mapped_file_source::data(void)const " (?data@mapped_file_source@iostreams@boost@@QEBAPEBDXZ) referenced in function "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl MD5FromFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?MD5FromFile@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBV12@@Z)
我试着链接以促进这一点。所以我添加了boost的路径和:
LIBS += -L"X:/Path/to/boost/boost_1_58_0/stage/lib"
LIBS += -llibboost_system-vc120-mt-1_58 -llibboost_iostreams-vc120-mt-1_58
LIBS += -llibboost_system-vc120-mt-gd-1_58 -llibboost_iostreams-vc120-mt-gd-1_58
但我还是犯了这个错误。现在我想指出,编译器(VS2013(找到了lib文件,但这显然还不够。
我还想提到,我也使用Boost::ASIO和OpenSSL,但这些链接没有问题。
知道如何链接到增强内存映射文件吗
谢谢。
是否确定32或64位库版本?如果您在32中构建,并且库在64中,则可能会出现。
相关文章:
- 添加静态constexpr成员是否会更改结构/类的内存映射
- C/C++ - 查询平台相关的换行符(用于内存映射文件)
- 字符串共享内存映射的向量
- 确保内存映射页位于内存中
- 我可以将新的 std::tuple 放入内存映射区域,并在以后读回吗?
- 内存映射文件访问非常慢
- 内存映射C++中的流数据
- 我正在尝试创建一个C++映射,该映射在boost内存映射文件中具有向量值
- 内存映射区域初始数据
- 内存映射 IO 概念详细信息
- 为什么 du -sh 输出错误大小的内存映射文件
- 您可以将C 对象映射到内存映射的外围设备吗?
- 将 Android 内存映射到具有零拷贝的 GraphicBuffer
- 在内存映射时写入内存映射的文件
- 如何使用 Boost 内存映射解析 C++ 中的 CSV?
- Growing Boost.使用单个写入器的进程间内存映射文件
- 调整窗口内存映射文件的大小,而不会使指针失效
- Winapi:是否需要在可执行内存映射的文件上调用FlushInstructionCache
- 与从C++到C#的内存映射文件共享链式结构
- 在 C++ 和 C# 之间共享内存映射文件结构