wailsapp / wails

Create beautiful applications using Go
https://wails.io
MIT License
25.34k stars 1.22k forks source link

"use options "-std=c99" (etc.) to compile your code" from webview dependency when running `wails init` #271

Closed psidex closed 5 years ago

psidex commented 5 years ago

Description

If I run wails init and choose a frontend (tested with react and vue options) during the "Ensuring Dependencies are up to date" stage, it errors onwebview.h included from lib/renderer/webview/webview.go, in function "DisplayHTMLPage": 'for' loop declaration only allowed in C99 mode.

You can see the full output of what I did here: https://pastebin.com/M2TShwaV

To Reproduce

Steps to reproduce the behaviour:

  1. Go to anywhere
  2. Run wails init
  3. Choose a frontend
  4. See error

Expected behaviour

I expected it to init the directory successfully

Screenshots

If applicable, add screenshots to help explain your problem.

System Details

Name Value
Wails Version v0.18.5
Go Version go1.13.1
Platform windows
Arch amd64
GO111MODULE on
GCC 4.8.3
Npm v10.16.3
Node 6.9.0

Additional context

This seems to be an issue with the webview module. There are a couple of issues about this already in the main repository; 1, 2.

leaanthony commented 5 years ago

A fix has been added to the latest pre-release. Please update using wails update -pre and let us know if that works for you! :+1:

psidex commented 5 years ago

I updated to v0.18.8-pre using that command, it still gives the exact same error.

Just as a side-note, I am using gcc installed from win-builds, not sure if its possible that that error is being caused because of that specific version of gcc somehow?

leaanthony commented 5 years ago

Might be. The version we test with is tdm-gcc as per the docs. I'm about to do another pre-release. Give it 5 mins and try again :-)

leaanthony commented 5 years ago

Ah I see what happened - the v0.18.9-pre tag wasn't pushed. However, v0.18.10-pre has now been pushed so you should get that plus unicode support on Windows :+1:

psidex commented 5 years ago

New error this time!

See the output here - https://pastebin.com/9ZwMx3vC

Looks like something doesn't like whitespace in that path - not sure if it's your code or something to do with win-builds?

I can re-test this tomorrow with tdm-gcc if that would make things easier.

leaanthony commented 5 years ago

Oh wow. Yeah, I think I know what that might be and I'm not 100% sure how to get around it. I'll try a quick fix :+1:

leaanthony commented 5 years ago

I'll need more time to look at this. We recommend tdm-gcc as this installs in a path with no spaces.

psidex commented 5 years ago

Sounds good, thanks for helping me so far 😄

I gotta stop for now but tomorrow I will try moving my win-builds install to a different path that doesn't have whitespace, and if that doesn't work, I'll try installing tdm-gcc.

I'll let you know what happens 👍

leaanthony commented 5 years ago

No worries. I'm going to do the opposite and see if I can fix it. What's odd is that the path is actually picked up from a built in Go method so I guess it just doesn't support escaping.

leaanthony commented 5 years ago

win-builds won't install for me so my default position is "use tdm-gcc". If this is an issue, just open up another ticket with as much info as possible :+1:

leaanthony commented 5 years ago

This should now be fixed in v0.18.11-pre. Please update to it using wails update -pre

psidex commented 5 years ago

Awesome, wails init and wails serve work perfectly now.

I am having a problem with the executable that wails build produces, would you like me to open a new issue or show you here?

leaanthony commented 5 years ago

Here 😃

On Sat, 26 Oct 2019, 05:49 Simon, notifications@github.com wrote:

Awesome, wails init and wails serve work perfectly now.

I am having a problem with the executable that wails build produces, would you like me to open a new issue or show you here?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/wailsapp/wails/issues/271?email_source=notifications&email_token=AAO2SYFEU7ERQF7XFH5MQKTQQM5TXA5CNFSM4JEUQDH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECJHNLA#issuecomment-546469548, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAO2SYDPM2IGUVVAS6QPFZLQQM5TXANCNFSM4JEUQDHQ .

psidex commented 5 years ago

Ok.

Well it's pretty much the image I posted, I run wails init, create a Vue project, run wails build, it builds fine, but running the exe shows that error.

If I click yes or no (doesn't matter which) the error goes away and I'm left with a blank screen.

wails serve works fine.

leaanthony commented 5 years ago

OK, can you open a new ticket using wails issue please. Thanks.

On Sat, 26 Oct 2019, 07:08 Simon, notifications@github.com wrote:

Ok.

Well it's pretty much the image I posted, I run wails init, create a project (a Vue project), run wails build, it builds fine, but running the exe shows that error.

If I click yes or no (doesn't matter which) the error goes away and I'm left with a blank screen.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/wailsapp/wails/issues/271?email_source=notifications&email_token=AAO2SYH4E6Z6URVV2S2W23LQQNG4PA5CNFSM4JEUQDH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECJNTMI#issuecomment-546494897, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAO2SYAVXELZV3EM47YJD6DQQNG4PANCNFSM4JEUQDHQ .

psidex commented 5 years ago

Yep sure, I'll do it right now.