duanbi8089 2016-02-29 03:35 采纳率: 100%
浏览 920

如何在IntelliJ IDEA中运行EXE Go可执行文件?

I have a Go program which I'm working on in IntelliJ IDEA on a Windows machine. The program's structure is a little unconventional (don't want to go into detail here as its besides the point) because of which I first have to compile the program using the following command:

go build -o cli.exe

And then I can run cli.exe directly in the command prompt.

But how do I configure the run configuration in IntelliJ IDEA so that it doesn't mind running a Windows executable ? Because if I try to tell it to run an EXE file as it's run configuration, it gives me error "Main file is invalid"

How do I solve this ?

  • 写回答

3条回答 默认 最新

  • douping3860 2016-02-29 03:38
    关注

    You may be able to install the Bash plugin on Windows, then create a run configuration using the Bash plugin, and just run your executable from a script.

    评论

报告相同问题?

悬赏问题

  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了
  • ¥50 切换TabTip键盘的输入法
  • ¥15 可否在不同线程中调用封装数据库操作的类
  • ¥15 微带串馈天线阵列每个阵元宽度计算
  • ¥15 keil的map文件中Image component sizes各项意思
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?