AllenDang / giu

Cross platform rapid GUI framework for golang based on Dear ImGui.
MIT License
2.36k stars 135 forks source link

error: 'isascii' was not declared in this scope #146

Closed MRLokop closed 3 years ago

MRLokop commented 3 years ago

Using:

$ go get -u github.com/AllenDang/giu@master
go: downloading github.com/AllenDang/giu v0.5.3-0.20210225120435-83efa4609bde
go: downloading github.com/go-resty/resty/v2 v2.5.0
go: downloading github.com/go-gl/glfw v0.0.0-20201108214237-06ea97f0c265
go: downloading github.com/go-resty/resty v1.12.0
go: downloading golang.org/x/net v0.0.0-20210224082022-3d97a244fca7
# github.com/AllenDang/giu/imgui
TextEditor.cpp: In member function 'void TextEditor::EnterCharacter(ImWchar, bool)':
TextEditor.cpp:1291:47: error: 'isascii' was not declared in this scope
 1291 |       for (size_t it = 0; it < line.size() && isascii(line[it].mChar) &&
      |                                               ^~~~~~~
TextEditor.cpp: In lambda function:
TextEditor.cpp:2690:35: error: 'isascii' was not declared in this scope
 2690 |       while (in_begin < in_end && isascii(*in_begin) && isblank(*in_begin))
      |                                   ^~~~~~~
TextEditor.cpp: In lambda function:
TextEditor.cpp:3235:35: error: 'isascii' was not declared in this scope
 3235 |       while (in_begin < in_end && isascii(*in_begin) && isblank(*in_begin))
      |                                   ^~~~~~~
MRLokop commented 3 years ago

I am create a repository, and implement isascii function, and i got another error:

$ go run main/main.go
# command-line-arguments
C:\Users\[user]\sdk\go1.15.8\pkg\tool\windows_amd64\link.exe: running g++ failed: exit status 1
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: cannot find -lmingwex
/usr/lib/gcc/x86_64-pc-msys/10.2.0/../../../../x86_64-pc-msys/bin/ld: cannot find -lmingw32
collect2: error: ld returned 1 exit status
AllenDang commented 3 years ago

@TheMRLokopOff Sorry for the late reply. It's really strange, I just built it under Windows 10. I may try another version of mingw to see whether I could repo this issue. Thanks to report it anyway.

MRLokop commented 3 years ago

Hello @AllenDang, i tried 3 versions of mingw, and no one worked. So can you please help with build it on linux for windows, or give your mingw version. Thanks for reply!

AllenDang commented 3 years ago

@TheMRLokopOff So you are trying to build windows version under linux?

MRLokop commented 3 years ago

Initially, I tried to do everything on windows, but I couldn't. I tried using wsl, but it didn't work there either, if needed

AllenDang commented 3 years ago

@TheMRLokopOff I will gather the information of my Windows 10 tonight and get back to you.

AllenDang commented 3 years ago

@TheMRLokopOff Here is a working env information from another issue. https://github.com/AllenDang/giu/issues/147#issuecomment-789963826