Skip to content

Is the program correct on the Linux/Ubuntu? #1

@Corezcy

Description

@Corezcy

When I try to build this program, I get this

src/text.cpp: In member function 'text::TextTexture text::FontShaper::renderText(const string&)':
src/text.cpp:86:10: error: 'wstring_convert' is not a member of 'std'
   86 |     std::wstring_convert<std::codecvt_utf8<char32_t>, char32_t> conv;
      |          ^~~~~~~~~~~~~~~
src/text.cpp:86:53: error: expected primary-expression before ',' token
   86 |     std::wstring_convert<std::codecvt_utf8<char32_t>, char32_t> conv;
      |                                                     ^
src/text.cpp:86:55: error: expected primary-expression before 'char32_t'
   86 |     std::wstring_convert<std::codecvt_utf8<char32_t>, char32_t> conv;
      |                                                       ^~~~~~~~
src/text.cpp:87:23: error: 'conv' was not declared in this scope; did you mean 'lconv'?
   87 |     return renderText(conv.from_bytes(s));
      |                       ^~~~
      |                       lconv

It seems that the compiler compatiable question. The wstring_convert is discarded from C++20.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions