Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Go(6g)を使用してGTKアプリケーションをコンパイルしていますが、コンソール実行可能ファイルではなくWindows実行可能ファイルにするためのコンパイラ/リンカーオプションがあるかどうかを知りたいです。MinGWにはこのための-mwindowsオプションがあり、現在、煩わしい16進エディターを使用してPEヘッダーを手動で変更する必要があります。
-ldflags5l、6l、または8lの各リンカー呼び出しで渡す「フラグリスト」引数 パッケージと依存関係をコンパイルする -Hwindowsgui(6l / 8lのみ)Windows PE32+GUIバイナリを作成する コマンドld
-ldflags5l、6l、または8lの各リンカー呼び出しで渡す「フラグリスト」引数
-ldflags
パッケージと依存関係をコンパイルする
-Hwindowsgui(6l / 8lのみ)Windows PE32+GUIバイナリを作成する
-Hwindowsgui
コマンドld
コマンドラインに追加-ldflags -Hwindowsguiします。go build/get/install例えば、
-ldflags -Hwindowsgui
go build/get/install
go build -ldflags="-Hwindowsgui" gtkapp.go