各位好,
小弟初次使用qt来编程,主要用它来编写一个image filter的gui,
安装好qt creator之后,使用CDB进行debug。
下面的代码主要是读取一个
QImage的像素值,然后放到一个动态创建的uchar数组srcimgdata中,但是
我在debug的过程中,执行到
srcimgdata的代码时候,会提示your debugger is not using the correct symbols. 就是说不能watchsrcimgdata的内容,但是其他静态变量比如i,j值之类的都可以watch,是我的cdb没有设置好吗? 我的qt creator是2.1.84, cdb中symbol paths: D:\Qt\4.7.0\lib source paths : - //intitialize srcimg and dstimg
- ui->tlbSrcimg->setIconSize(resultSize);
- loadImage("lenna.jpg", &srcImage, ui->tlbSrcimg);
- if(srcImage.format()!=QImage::Format_ARGB32)
- { srcImage = srcImage.convertToFormat(QImage::Format_ARGB32); }
-
- qDebug()<<srcImage.bytesPerLine();
-
- if(imgheight>0&&imgwidth>0)
- {
- dstImage = new QImage(imgwidth,imgheight,QImage::Format_ARGB32);
- dstImage->fill(qRgba(0, 0, 0, 0));
- ui->lblDstimg->setPixmap(QPixmap::fromImage(*dstImage));
- srcimgdata = new uchar[imgwidth*imgheight*4];
- int i, j;
- for(i = 0; i < imgheight; i++)
- {
- for(j = 0; j < imgwidth; j++)
- {
- QRgb color = srcImage.pixel(j, i);
-
- srcimgdata[i*imgwidth*4+j] = qAlpha(color);
- // qDebug()<<srcimgdata[i*imgwidth*4+j]<<" "<<i<<" "<<j;
- srcimgdata[i*imgwidth*4+j+1] = qRed(color);
- srcimgdata[i*imgwidth*4+j+2] = qGreen(color);
- srcimgdata[i*imgwidth*4+j+3] = qBlue(color);
- }
- }
- }
Your debugger is not using the correct symbols ***
*** ***
*** In order for this command to work properly, your symbol path ***
*** must point to .pdb files that have full type information. ***
*** ***
*** Certain .pdb files (such as the public OS symbols) do not ***
*** contain the required information. Contact the group that ***
*** provided you with these symbols if you need this command to ***
*** work. ***
*** ***
*** Type referenced: srcimgdata
[ 此帖被迈克老狼在2011-05-01 10:04重新编辑 ]