刘泥玛 2016-05-31 02:07 采纳率: 0%
浏览 7870

程序无法启动。。。系统找不到指定文件

#include"stdafx.h"
#include
#include
#include
using namespace cv;
using namespace std;

int main(){
CString abPath = "C:\Profram Files\feiq\Recv Files\ACSImage\cache\v3.2\代表图";
getFile(abPath);
}
void changeSize(CString cs_abPath,string abSavePath,CString fileName){
Mat img = imread(cs_abPath.GetBuffer);
Mat dst;
string savePath = abSavePath +"\" +fileName.GetBuffer+".jpg";
double scale;
int img_height = img.rows;
scale = 400.0/ img_height;
resize(img, dst, Size(0, 0), scale, scale);
imwrite(savePath,dst);
}
void getFile(CString pathStr){
CString myDataPath, fdPath;
myDataPath =pathStr+"\*.*";
CFileFind finder;
boolean buffer = finder.FindFile(myDataPath);
string abSavePath = "C:\Profram Files\feiq\Recv Files\ACSImage\cache\v3.2\代表图小图";
while (buffer)
{
buffer = finder.FindNextFileW();
if (!finder.IsDots){
/*fdPath是当前的路径,
判断:
如果当前这个路径下是文件夹 递归(fdPath)
如果当前这个路径下是文件 则调changeSize()
多个文件的可以吗??
保存文件的路径怎么办??
逻辑上还是有问题
*/
fdPath = finder.GetFilePath;
if (finder.IsDirectory)
{
getFile(fdPath);
}

else
{
changeSize(fdPath, abSavePath, finder.GetFileName());
}
}

}
finder.Close();
}

代码如上 win32AP 我想不用MFC然后调用MFC里的一些类, 出现题目所示问题.
1>------ Build started: Project: opencvTestBYljk, Configuration: Debug Win32 ------
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets(364,5): warning MSB8004: Output Directory does not end with a trailing slash. This build instance will add the slash as it is required to allow proper evaluation of the Output Directory.
1> opencvTestBYljk.cpp
1>d:\lx\home\proj\cuda\opencvtestbyljk\opencvtestbyljk\opencvtestbyljk.cpp(10): error C3861: 'getFile': identifier not found
1>d:\lx\home\proj\cuda\opencvtestbyljk\opencvtestbyljk\opencvtestbyljk.cpp(13): error C3867: 'ATL::CSimpleStringT::GetBuffer': function call missing argument list; use '&ATL::CSimpleStringT::GetBuffer' to create a pointer to member
1>d:\lx\home\proj\cuda\opencvtestbyljk\opencvtestbyljk\opencvtestbyljk.cpp(15): error C2678: binary '+' : no operator found which takes a left-hand operand of type 'std::basic_string,std::allocator>' (or there is no acceptable conversion)
1> d:\opencv249\opencv\build\include\opencv2\core\mat.hpp(2001): could be 'cv::MatConstIterator cv::operator +(ptrdiff_t,const cv::MatConstIterator &)'
1> d:\opencv249\opencv\build\include\opencv2\core\mat.hpp(1998): or 'cv::MatConstIterator cv::operator +(const cv::MatConstIterator &,ptrdiff_t)'
1> d:\opencv249\opencv\build\include\opencv2\core\mat.hpp(1268): or 'cv::MatExpr cv::operator +(const cv::MatExpr &,const cv::MatExpr &)'
1> d:\opencv249\opencv\build\include\opencv2\core\mat.hpp(1267): or 'cv::MatExpr cv::operator +(const cv::Scalar &,const cv::MatExpr &)'
1> d:\opencv249\opencv\build\include\opencv2\core\mat.hpp(1266): or 'cv::MatExpr cv::operator +(const cv::MatExpr &,const cv::Scalar &)'
1> d:\opencv249\opencv\build\include\opencv2\core\mat.hpp(1265): or 'cv::MatExpr cv::operator +(const cv::Mat &,const cv::MatExpr &)'
1> d:\opencv249\opencv\build\include\opencv2\core\mat.hpp(1264): or 'cv::MatExpr cv::operator +(const cv::MatExpr &,const cv::Mat &)'
1> d:\opencv249\opencv\build\include\opencv2\core\mat.hpp(1263): or 'cv::MatExpr cv::operator +(const cv::Scalar &,const cv::Mat &)'
1> d:\opencv249\opencv\build\include\opencv2\core\mat.hpp(1262): or 'cv::MatExpr cv::operator +(const cv::Mat &,const cv::Scalar &)'
1> d:\opencv249\opencv\build\include\opencv2\core\mat.hpp(1261): or 'cv::MatExpr cv::operator +(const cv::Mat &,const cv::Mat &)'
1> d:\opencv249\opencv\build\include\opencv2\core\operations.hpp(2248): or 'cv::Range cv::operator +(int,const cv::Range &)'
1> d:\opencv249\opencv\build\include\opencv2\core\operations.hpp(2243): or 'cv::Range cv::operator +(const cv::Range &,int)'
1> while trying to match the argument list '(std::basic_string,std::allocator>, overloaded-function)'
1>d:\lx\home\proj\cuda\opencvtestbyljk\opencvtestbyljk\opencvtestbyljk.cpp(31): error C2276: '!' : illegal operation on bound member function expression
1>d:\lx\home\proj\cuda\opencvtestbyljk\opencvtestbyljk\opencvtestbyljk.cpp(40): error C3867: 'CFileFind::GetFilePath': function call missing argument list; use '&CFileFind::GetFilePath' to create a pointer to member
1>d:\lx\home\proj\cuda\opencvtestbyljk\opencvtestbyljk\opencvtestbyljk.cpp(40): error C2679: binary '=' : no operator found which takes a right-hand operand of type 'overloaded-function' (or there is no acceptable conversion)
1> d:\program files (x86)\microsoft visual studio 12.0\vc\atlmfc\include\cstringt.h(1322): could be 'ATL::CStringT>> &ATL::CStringT>>::operator =(const VARIANT &)'
1> d:\program files (x86)\microsoft visual studio 12.0\vc\atlmfc\include\cstringt.h(1314): or 'ATL::CStringT>> &ATL::CStringT>>::operator =(char)'
1> d:\program files (x86)\microsoft visual studio 12.0\vc\atlmfc\include\cstringt.h(1305): or 'ATL::CStringT>> &ATL::CStringT>>::operator =(wchar_t)'
1> d:\program files (x86)\microsoft visual studio 12.0\vc\atlmfc\include\cstringt.h(1299): or 'ATL::CStringT>> &ATL::CStringT>>::operator =(const unsigned char *)'
1> d:\program files (x86)\microsoft visual studio 12.0\vc\atlmfc\include\cstringt.h(1281): or 'ATL::CStringT>> &ATL::CStringT>>::operator =(const char *)'
1> d:\program files (x86)\microsoft visual studio 12.0\vc\atlmfc\include\cstringt.h(1273): or 'ATL::CStringT>> &ATL::CStringT>>::operator =(const wchar_t *)'
1> d:\program files (x86)\microsoft visual studio 12.0\vc\atlmfc\include\cstringt.h(1258): or 'ATL::CStringT>> &ATL::CStringT>>::operator =(const ATL::CStringT>> &)'
1> while trying to match the argument list '(CString, overloaded-function)'
1>d:\lx\home\proj\cuda\opencvtestbyljk\opencvtestbyljk\opencvtestbyljk.cpp(41): error C3867: 'CFileFind::IsDirectory': function call missing argument list; use '&CFileFind::IsDirectory' to create a pointer to member

  • 写回答

3条回答 默认 最新

  • Robot-S 2016-05-31 02:12
    关注

    我经常遇到这样的问题,一直都迷糊$(OutDir)$(TargetName)$(TargetExt)、$(SolutionDir)$(Configuration)。闹不明白。
    很多时候,我们会将一些低版本IDE编译过的项目,搬迁到VS2010 ,那么会存在很多编译,调试问题。
    【1】 编译成功了。可是无法调试 。
    .     &nb......
    答案就在这里:vs2010 无法启动程序 系统找不到指定的文件
    ----------------------Hi,地球人,我是问答机器人小S,上面的内容就是我狂拽酷炫叼炸天的答案,除了赞同,你还有别的选择吗?

    评论

报告相同问题?

悬赏问题

  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题