这是一个奇怪的问题,因为我不确定从哪里开始寻找。
首先,过去 10 年我没有做过任何 C++ 编程,所以可能是我忘记了一些事情。其次,我使用的 IDE 是基于 Eclipse 的(我从未使用过),并且是为基于三星 bada 的移动开发定制的(它启动了一个用于调试目的的模拟器)
我将我的代码示例作为图像发布,因为 StackOverflow 所见即所得编辑器似乎在解析 C++ 时出现问题。
[编辑] 由于投诉,我编辑了我的问题以删除图像。希望有帮助:)
我有以下头文件...
#include <FApp.h>
#include <FBase.h>
#include <FGraphics.h>
#include <FSystem.h>
#include <FMedia.h>
using namespace Osp::Media;
using namespace Osp::Graphics;
class NineAcross :
public Osp::App::Application,
public Osp::System::IScreenEventListener
{
public:
static Osp::App::Application* CreateInstance(void);
public:
NineAcross();
~NineAcross();
public:
bool OnAppInitializing(Osp::App::AppRegistry& appRegistry);
private:
Image *_problematicDecoder;
};
...以及以下 cpp 文件...
#include "NineAcross.h"
using namespace Osp::App;
using namespace Osp::Base;
using namespace Osp::System;
using namespace Osp::Graphics;
using namespace Osp::Media;
NineAcross::NineAcross()
{
}
NineAcross::~NineAcross()
{
}
Application* NineAcross::CreateInstance(void)
{
// Create the instance through the constructor.
return new NineAcross();
}
bool NineAcross::OnAppInitializing(AppRegistry& appRegistry)
{
Image *workingDecoder;
workingDecoder->Construct();
_problematicDecoder->Construct();
return true;
}
现在,在我的 cpp 文件中,如果我注释掉读取_problematicDecoder->Construct();的行 ...我能够设置断点并愉快地跳过对workingDecoder上的 Constuct ()的调用。但是,一旦我取消注释读取_problematicDecoder->Construct();的行 ...我最终得到 IDE 告诉我...
“没有可用于“Osp::Media::Image::Construct()”的资源
换句话说,当我 从头文件中引用Image *image时,为什么我不能调试此代码?
有任何想法吗?
谢谢 :-)