Comments (12)
apt install binutils-mingw-w64
64bit
GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ go build -ldflags "-H windowsgui"
32bit
GOOS=windows GOARCH=386 CGO_ENABLED=1 CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ go build -ldflags "-H windowsgui"
from webview.
apt install binutils-mingw-w64
64bit
GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ go build -ldflags "-H windowsgui"
32bit
GOOS=windows GOARCH=386 CGO_ENABLED=1 CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ go build -ldflags "-H windowsgui"
compile with error:
# runtime/cgo
exec: "x86_64-w64-mingw32-gcc": executable file not found in $PATH
fixed by:
sudo apt install gcc-mingw-w64-x86-64
from webview.
sudo apt install gcc-mingw-w64-x86-64
This did not solve my issue, any other thought?
if you use ubuntu:last to run goreleaser, i try this
sudo apt-get install -y *-w64-x86-*
it worked for me.
from webview.
Ain't it a duplicate of #11? This library uses cgo, so you have to cross-compile it with some mingw toolchain, CGO_ENABLED=1 etc.
from webview.
ah of course.. sorry.
ok then the easiest way is to use the docker xgo then..
https://github.com/karalabe/xgo
from webview.
I am on OSX, not linux
i got a windows build working. Opened Windows 10 in vagrant and it ran !!
OSX failed... mhhh
go get github.com/karalabe/xgo
cd $(EX_FILE_PATH)/todo-go && xgo --out todo-win --targets=windows/*,darwin/* .
out:
Checking for required docker image karalabe/xgo-latest... found.
Cross compiling github.com/zserge/webview/examples/todo-go...
Building locally github.com/zserge/webview/examples/todo-go...
Compiling for windows-4.0/amd64...
Compiling for windows-4.0/386...
Compiling for darwin-10.6/amd64...
# github.com/zserge/webview
In file included from ../../webview.go:24:
./webview.h:1043:22: error: use of undeclared identifier 'NSWindowStyleMaskTitled'
NSUInteger style = NSWindowStyleMaskTitled | NSWindowStyleMaskClosable |
^
./webview.h:1043:48: error: use of undeclared identifier 'NSWindowStyleMaskClosable'
NSUInteger style = NSWindowStyleMaskTitled | NSWindowStyleMaskClosable |
^
./webview.h:1044:22: error: use of undeclared identifier 'NSWindowStyleMaskMiniaturizable'
NSWindowStyleMaskMiniaturizable;
^
./webview.h:1046:21: error: use of undeclared identifier 'NSWindowStyleMaskResizable'
style = style | NSWindowStyleMaskResizable;
^
./webview.h:1074:49: error: use of undeclared identifier 'NSEventMaskAny'
NSEvent *event = [NSApp nextEventMatchingMask:NSEventMaskAny
^
5 errors generated.
from webview.
It requires a newer XCode: #18
from webview.
Did you mean to close this ??
i am on the latest OSX & Xcode already
uname -a
Darwin x-MacBook-Pro.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
Xcode
Version 9.0 (9A235)
from webview.
@joeblew99 Yes, your host environment is fine. Is it only xgo
build that fails, or your local go build
fails, too?
from webview.
local go build is fine on osx darwin.
xgo / docker is also fine for windows x86 and amd64.
I am just configuring my make file for xgo / docker build for linux and darwin.
I kind of like the docker based build using xgo because you dont need a CI travis anymore if you dont want it.
from webview.
Just pushed some changes, can you please check if this got fixed?
from webview.
sudo apt install gcc-mingw-w64-x86-64
This did not solve my issue, any other thought?
from webview.
Related Issues (20)
- How to correctly render the web page? HOT 3
- Q: HTTP communication over unix domain sockets HOT 1
- Add troubleshooting hint to readme about where to get CMake on windows machines.
- Calling Webview::eval on some JS code does not work. HOT 7
- How to pass a javascript function as an arg to C/C++? HOT 1
- [bug] utf8 support for webbind HOT 17
- How to stream bytes to webview?
- Handling webview as part of a library causes segfault when setting variables (Linux/C++) HOT 1
- Looking for Qt binding project
- One Window multiple webviews HOT 5
- Update to webkitgtk-6.0 (GTK4, libsoup 3) HOT 1
- How to run javascript code passed as an html string to the webview in secure context? HOT 1
- Call webview_eval from thread HOT 1
- enable microphone in MacOs Sonoma ?
- Mac OS - JS mousedown is not working properly HOT 2
- Cannot use set_html with string longer than 1572834 characters on Windows HOT 4
- Font not property rendered in macos using webgl HOT 1
- how Inject JavaScript code?
- Not work when embed into a win32 window HOT 2
- error: undefined symbol: gtk_init_check
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webview.