CEGUI related issues
-
Fellow teachers, my English is poor it may be more vague expression, but also you are forgiven!(各位老师,我英语很差所以表达上可能比较模糊,还请您们见谅!) I compiled CELayoutEditor this program when met a very difficult issue, the program has been in one place error, the error is as follows: (我在编译 CELayoutEditor 这个程序的时候,碰到了一个很棘手的问题,该程序一直在一个地方报错,错误如下:) error C3861: 'wxStrdupA': identifier not found Code fragment: (代码片段 Buffer.h header files: #ifndef _WX_BUFFER_H #define _WX_BUFFER_H #include "wxchar.h" #include <stdlib.h> // malloc() and free() DEFINE_BUFFER(wxCharBuffer, char, wxStrdupA); #if wxUSE_WCHAR_T DEFINE_BUFFER(wxWCharBuffer, wchar_t, wxStrdupW); #endif // wxUSE_WCHAR_T wxchar.h header files: #include <stdarg.h> #include <string.h> /* Almost all compiler have strdup(), but not quite all: CodeWarrior under Mac */ /* and VC++ for Windows CE don't provide it */ #if !(defined(__MWERKS__) && defined(__WXMAC__)) && !defined(__WXWINCE__) /* use #define, not inline wrapper, as it is tested with #ifndef below */ #define wxStrdupA strdup #endif Can tell about what is wrong somewhere? Is there any way to solve this problem? Thank you! (可以告诉一下是什么地方出现问题?有没有什么办法解决这个问题?谢谢!)
-
Fellow teachers, my English is poor it may be more vague expression, but also you are forgiven!(各位老师,我英语很差所以表达上可能比较模糊,还请您们见谅!) I compiled CELayoutEditor this program when met a very difficult issue, the program has been in one place error, the error is as follows: (我在编译 CELayoutEditor 这个程序的时候,碰到了一个很棘手的问题,该程序一直在一个地方报错,错误如下:) error C3861: 'wxStrdupA': identifier not found Code fragment: (代码片段 Buffer.h header files: #ifndef _WX_BUFFER_H #define _WX_BUFFER_H #include "wxchar.h" #include <stdlib.h> // malloc() and free() DEFINE_BUFFER(wxCharBuffer, char, wxStrdupA); #if wxUSE_WCHAR_T DEFINE_BUFFER(wxWCharBuffer, wchar_t, wxStrdupW); #endif // wxUSE_WCHAR_T wxchar.h header files: #include <stdarg.h> #include <string.h> /* Almost all compiler have strdup(), but not quite all: CodeWarrior under Mac */ /* and VC++ for Windows CE don't provide it */ #if !(defined(__MWERKS__) && defined(__WXMAC__)) && !defined(__WXWINCE__) /* use #define, not inline wrapper, as it is tested with #ifndef below */ #define wxStrdupA strdup #endif Can tell about what is wrong somewhere? Is there any way to solve this problem? Thank you! (可以告诉一下是什么地方出现问题?有没有什么办法解决这个问题?谢谢!)
Have no idea where you got these codes, just try changing wxchar.h to be like this: #include #include #ifndef wxStrdupA #define wxStrdupA strdup #endif
-
Fellow teachers, my English is poor it may be more vague expression, but also you are forgiven!(各位老师,我英语很差所以表达上可能比较模糊,还请您们见谅!) I compiled CELayoutEditor this program when met a very difficult issue, the program has been in one place error, the error is as follows: (我在编译 CELayoutEditor 这个程序的时候,碰到了一个很棘手的问题,该程序一直在一个地方报错,错误如下:) error C3861: 'wxStrdupA': identifier not found Code fragment: (代码片段 Buffer.h header files: #ifndef _WX_BUFFER_H #define _WX_BUFFER_H #include "wxchar.h" #include <stdlib.h> // malloc() and free() DEFINE_BUFFER(wxCharBuffer, char, wxStrdupA); #if wxUSE_WCHAR_T DEFINE_BUFFER(wxWCharBuffer, wchar_t, wxStrdupW); #endif // wxUSE_WCHAR_T wxchar.h header files: #include <stdarg.h> #include <string.h> /* Almost all compiler have strdup(), but not quite all: CodeWarrior under Mac */ /* and VC++ for Windows CE don't provide it */ #if !(defined(__MWERKS__) && defined(__WXMAC__)) && !defined(__WXWINCE__) /* use #define, not inline wrapper, as it is tested with #ifndef below */ #define wxStrdupA strdup #endif Can tell about what is wrong somewhere? Is there any way to solve this problem? Thank you! (可以告诉一下是什么地方出现问题?有没有什么办法解决这个问题?谢谢!)
Try it (this code has good chances under CE and under PC as well) :) :
{
...
TCHAR* tszResult = _tcsdup(_T("先生"));
// do something with the result:
...
// Clearance:
free(tszResult);
...
}virtual void BeHappy() = 0;
-
Have no idea where you got these codes, just try changing wxchar.h to be like this: #include #include #ifndef wxStrdupA #define wxStrdupA strdup #endif
I tried to modify your approach, or can not eliminate this error, I now have Mozhe the (我试着用你的方法修改,还是不能消除这个错误,我现在已经没辙了) Code is found in the online, open source (代码是在网上找到的,开源的)
-
Try it (this code has good chances under CE and under PC as well) :) :
{
...
TCHAR* tszResult = _tcsdup(_T("先生"));
// do something with the result:
...
// Clearance:
free(tszResult);
...
}virtual void BeHappy() = 0;
What do you? Did not understand ah!