Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CEGUI related issues

CEGUI related issues

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestionc++
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pointSX2010
    wrote on last edited by
    #1

    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! (可以告诉一下是什么地方出现问题?有没有什么办法解决这个问题?谢谢!)

    H E 2 Replies Last reply
    0
    • P pointSX2010

      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! (可以告诉一下是什么地方出现问题?有没有什么办法解决这个问题?谢谢!)

      H Offline
      H Offline
      hanq_38910130
      wrote on last edited by
      #2

      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

      P 1 Reply Last reply
      0
      • P pointSX2010

        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! (可以告诉一下是什么地方出现问题?有没有什么办法解决这个问题?谢谢!)

        E Offline
        E Offline
        Eugen Podsypalnikov
        wrote on last edited by
        #3

        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;

        P 1 Reply Last reply
        0
        • H hanq_38910130

          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

          P Offline
          P Offline
          pointSX2010
          wrote on last edited by
          #4

          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 (代码是在网上找到的,开源的)

          1 Reply Last reply
          0
          • E Eugen Podsypalnikov

            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;

            P Offline
            P Offline
            pointSX2010
            wrote on last edited by
            #5

            What do you? Did not understand ah!

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups