Menu

#363 wxCmdLineEntryDesc.description is a narrow string (const char*) in wxWidgets 3.0.0

1.0.0.0
closed-out-of-date
None
5
2014-08-16
2014-04-23
Anonymous
No
./src/mmex.cpp:44:1: error: cannot convert ‘const wxString’ to ‘const char*’ in initialization
 };
 ^
Makefile:546: recipe for target 'mmex_mmex.o' failed
make: *** [mmex_mmex.o] Error 1

Seems like wxWidgets 3.0.0 changed the API for wxCmdLineEntryDesc, which expects a narrow string instead.

According to http://docs.wxwidgets.org/3.0/groupgroupfuncmacro__string.html#ga2e7c1f911a731a4b98a85fa44f1d9fbc, the macro wxT_2 should be used.

A patch is included.

1 Attachments

Discussion

  • Nikolay

    Nikolay - 2014-04-23
    • assigned_to: James
     
  • Nikolay

    Nikolay - 2014-04-23

    Hi James, could you please inspect the patch

     
  • Anonymous

    Anonymous - 2014-04-23

    There is quite a few instances of backwards-incompatible changes regarding wxString in wxWidgets 3.0. Quote from http://docs.wxwidgets.org/trunk/overview_changes_since28.html:

    The most serious backwards-incompatible change is related to the change of return type of wxString::c_str() method: it returns a special proxy object instead of a simple char or wchar_t now. Because of this, you cannot pass its result to any standard vararg functions such as printf() any more as described in Unicode-Related Compilation Errors.

    Finally, a few structure fields, notable wxCmdLineEntryDesc::shortName, longName and description fields have been changed to be of type const char instead of const wxChar so you will need to remove wxT() or _T() if you used it with their initializers.

    There's issues with wxExtension which MMEX depends on. I'll send pull requests to the author on Github.

     
  • Nikolay

    Nikolay - 2014-04-23

    I just doubt about _() macro. Not shue if this needed here.

     
  • Nikolay

    Nikolay - 2014-04-23

    Anyway, great patches. Maybe you will our developer?

     
  • Nikolay

    Nikolay - 2014-04-24
    • assigned_to: James --> guanlisheng
     
  • Nikolay

    Nikolay - 2014-04-24

    Hi Lisheng, could you please examin this patch?

     
    • guanlisheng

      guanlisheng - 2014-04-24

      I don't see the need to apply this patch.

       
  • Nikolay

    Nikolay - 2014-06-07
    • status: open --> closed-out-of-date
     
  • Nikolay

    Nikolay - 2014-06-07
     

Log in to post a comment.