Metasequoia BBS

| 新規投稿 | 通常表示 | ツリー表示 |
状態
タグ
キーワード
[4609] Compiling an example plugin / Nick
[質問] 返信
I'm trying to compile a sample plugin project (Measure) from the SDK in an IDE other than VS and get some errors.

I fixed some by using -fpermissive switch,

another by changing,

typedef MQWidgetSharedPtr std::shared_ptr

to

#define  MQWidgetSharedPtr std::shared_ptr

but I get this error,

\MQWidget.h|140|error: incomplete type 'MQWidgetBase' used in nested name specifier

for lines like this

if(MQWidgetBase::FindWidgetByID(id) != NULL){
...}

What do I need to do to fix this error?
2014-06-25 18:14
[4611] Re: Compiling an example plugin / 管理者
I think many modifications to the SDK code are required in the other compiler. I recommend Visual C++ (Express).

Does the compiler support std::shared_ptr?

And MQWidgetBase defines after line 140.
I guess the compiler requires not the MQWidgetBase's forward decalataion in line 24 but the MQWidgetBase's definition after line 335.
Move the functions used MQWidgetBase::FindWidgetByID() after the MQWidgetBase's definition.
2014-06-25 19:29
[4615] Compiling an example plugin / Nick
OK I will try just for curiosity.

I downloaded VC++ 2010 Express via web installer but at the end of converting the mqsdk solution it reports all projects are corrupt and unloads them so I tried Code::Blocks.

Since Microsoft no longer release VS 2008 Express it took me a while to find the SP1 version (found a link in a stackoverflow topic) and now I use that and the projects compile no problem.
2014-06-26 13:48