Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

const char instead of const wchar_t #797

Closed

Conversation

tobiolo
Copy link
Collaborator

@tobiolo tobiolo commented Jan 8, 2025

wxWidgets macro now expects const char* instead of const wchar_t*

.../Development/treesheets/src/myframe.h:130:26: error: no matching function for call to 'wxUnderscoreWrapper'
  130 |             wxMessageBox(_(L"Error loading core data file (TreeSheets not installed correctly?)"),
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.../Development/treesheets/lib/wxWidgets/include/wx/translation.h:48:48: note: expanded from macro '_'
   48 |     #define _(s)                               wxUnderscoreWrapper((s))
      |                                                ^~~~~~~~~~~~~~~~~~~
...//Development/treesheets/lib/wxWidgets/include/wx/translation.h:347:17: note: candidate template ignored: could not match 'const char' against 'const wchar_t'
  347 | const wxString& wxUnderscoreWrapper(const char (&msg)[N])
      |                 ^

@tobiolo tobiolo force-pushed the const-char-instead-of-const_wchar_t branch from 929e623 to e669cb5 Compare January 8, 2025 20:38
@tobiolo tobiolo changed the title Const char instead of const wchar t Const char instead of const wchar_t Jan 8, 2025
@tobiolo tobiolo requested a review from aardappel January 8, 2025 20:41
@tobiolo tobiolo changed the title Const char instead of const wchar_t const char instead of const wchar_t Jan 8, 2025
@aardappel
Copy link
Owner

How did this happen? Did we upgrade to a newer wxWidgets? Does that mean it won't compile with older versions after this change?

@tobiolo
Copy link
Collaborator Author

tobiolo commented Jan 9, 2025

Yes, wxWidgets introduced these changes. I cannot say whether it compiles with older versions because when I want to checkout the wxWidgets submodule to v3.2.6 I get issues with a scintilla submodule within wxWidgets (scintilla is a submodule now but has been a regular folder before).

@aardappel
Copy link
Owner

ok, that be good to figure out first. If it means we're locked to the latest wxWidgets we should be careful about that?

@tobiolo
Copy link
Collaborator Author

tobiolo commented Jan 10, 2025

This will be fixed upstream
wxWidgets/wxWidgets#25063

@tobiolo tobiolo closed this Jan 10, 2025
@tobiolo tobiolo deleted the const-char-instead-of-const_wchar_t branch January 10, 2025 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants