Boost文件阻塞使用SHGetKnownFolderPath
Boost file blocking use of SHGetKnownFolderPath
我遇到的问题是,我正在尝试创建一个函数,该函数将动态检索桌面的文件路径并将其作为字符串返回,该函数有效,因为我在另一个程序中使用它。然而,我试图使用它的新程序也使用"boost/asio.hpp",当我包含这个文件时,VisualStudio告诉我SHGetKnownFolderPath
是未定义的,但如果我拿出#include<boost/asio.hpp>
,那么它会因为需要它的代码而抛出错误。
我不确定要添加什么,减去或改变得到这个工作,真的没有直接的答案在那里,我发现,谢谢。
EDIT:以下是包含
的源文件#include <boost/asio.hpp>
#include <boost/array.hpp>
#include <boost/date_time.hpp>
#include "INSData.pb.h"
#include "Header.h"
#include "shellapi.h"
#include "SQLHeader.h"
这里是Header.h包含
#include <shlobj.h>//for knownFolder
#include <winerror.h> //for HRESULT
#include <comutil.h> //for _bstr_t (used in the string conversion)
#include "fstream"
#include <regex>
#include "MGS/GoogleEarth/KmlNodes.h"
#pragma comment(lib, "comsuppw")
最终选择了另一条路线。只是将需要冲突文件的函数的定义移动到另一个.cpp文件中,并在两个.cpp文件都可以访问的.h文件中声明它们。
相关文章:
- 没有找到相关文章