Codelite不运行C程序

发布于 2025-02-03 01:37:12 字数 636 浏览 5 评论 0原文

每当我尝试构建和运行一个程序时,包括标准“ Hello World!”什么都没有发生,我得到:

====程序以退出代码退出:0 ==== 时间过去:000:00.000(mm:ss.ms) 按任何键继续...

在底部说:

'ming32-make'未被认为是内部或外部命令,可操作的prgram或批处理文件。

我在Windows 10上有CodeLite版本16。我还安装了mingw到C:并已编辑了环境变量以包括C:\ mingw \ bin,

但是,在命令提示> gcc> gcc-version 中c:\ users \ me>和不是c:\ mingw

我不知道这是否相关的gcc版本。

所有其他结果似乎都暗示了一个编译器没有发现问题,但这似乎不是我的情况。提前致谢。

这是我目前已经安装的。我可以从其他文件之一中获取'make''吗?

已安装的文件

Everytime I try to build and run a program, including the standard 'Hello world!' nothing happens, I get:

==== Program exited with exit code: 0 ====
Time elapsed: 000:00.000 (MM:SS.MS)
Press any key to continue...

At the bottom it says:

'ming32-make' is not recognized as an internal or external command, operable prgram or batch file.

I have Codelite version 16 on Windows 10. I also have MinGW installed to C: and have edited the Environment variables to include C:\MinGW\bin

However, in command prompt gcc --version shows me the gcc version in C:\Users\me> and not C:\MinGW

I don't know if this is relevant or not.

All the other results seem to suggest a compiler not found problem, but this does not seem to be my case. Thanks in advance.

This is what I have installed at the moment. Can I get 'make'from one of the other files?

The Installed files

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

夜夜流光相皎洁 2025-02-10 01:37:12

看起来您要么没有ming32-make.exe,要么找不到。

我还注意到您仍然使用旧的mingw。我建议切换到较新的Mingw-W64(支持Windows 32位和64位)。

独立构建来自 https://winlibs.com/ 确实包括ming32-make.exe,并且由于您可以将其拉开(无需安装),因此您可以在不删除旧MingW的情况下尝试它。只需确保您的路径变量中没有任何内容即可避免从错误的位置运行程序。

Looks like you either don't have ming32-make.exe or it can't be found.

Also I notice you still use old MinGW. I would recommend switching to newer MinGW-w64 (which supports both Windows 32-bit and 64-bit).

The standalone build from https://winlibs.com/ does include ming32-make.exe, and since you can just unzip it (no installation needed) you can try it without removing the old MinGW. Just make sure you don't have anything in your PATH variable to avoid running programs from the wrong location.

春风十里 2025-02-10 01:37:12

ming32-make.exe未安装或在环境变量上找不到path

否,该箱文件夹中没有mingw32 make。当我最初使用安装程序时,我只选择:MingW32-GCC-G ++ -BIN,尽管还有其他bin文件。我在哪里可以得到它?

mingw32-make已过时。

如何使用mingw?

请参阅 Mingw的问题,我建议使用 msys2 或包装管理器,例如巧克力

首先要摆脱先前的安装。不是强制性的,但由于多副本的MingW副本而防止混乱和储存量。

要使用巧克力安装mingW,请运行CMD作为管理员,并

choco install mingw

用于make

choco install make

ming32-make.exe is either not installed or can't be found on your Environment variable PATH.

No, there is no mingw32-make in that bin folder. When I used the Installer originally I only selected: mingw32-gcc-g++-bin although there were other bin files. Where can I get it?

mingw32-make is outdated.

See How to compile makefile using MinGW?

If you are having problems with mingw, I would recommend using MSYS2 or a package manager like Chocolatey.

Just get rid of the previous installation first. Not mandatory but prevents confusion and storage drain due to multiple copies of mingw.

To install MinGw using chocolatey, run cmd as admin and use

choco install mingw

For make

choco install make
椵侞 2025-02-10 01:37:12

对我有用的是从安装程序中安装mingw32-base-bin(请参阅原始问题中图像中的第二个选项)。
我遵循的安装教程没有提到安装此操作。
我决定将此作为答案,以防其他人遇到类似的问题。

What worked for me was also installing mingw32-base-bin from the Installer (see second option in image in the original question).
The installation tutorial I was following did not mention installing this.
I've decided to leave this here as an answer in case someone else runs into a similar problem.

权谋诡计 2025-02-10 01:37:12

对于最近的Codelite或VS代码安装中的编译器,MSYS是一个不错的选择。 <

一旦您使用以下步骤从 installer ,但仍然有make的问题,然后按照以下步骤操作:

  1. 如果先前安装的话,请从窗口重新打开MSYS2终端。
  2. 运行命令pacman -s -s-需要的基本基础MINGW-W64-X86_64-TOOLCHAIN
  3. 您将要求您从列表中选择该选项。您应该选择指mingw-w64-x86_64-make的选项。
  4. 完成安装后,然后打开Codelite 设置 - &GT; BUID设置并检查您的make文件位置。如果那是空的或显示未知位置,请单击该盒子右侧的三个点。浏览并导航到位置或Pacman安装make的位置。就我而言,它是c:/msys64/usr/bin/make.exe

  1. 单击应用并保存。
  2. 现在可能需要创建一个新的工作区并重新运行您的代码。

MSYS is a good option for compilers in recent CodeLite or VS-Code installation. https://www.msys2.org/.

Once you downloaded the compiler using the following steps from the installer but still have the problem with the make then follow these steps:

  1. Reopen the MSYS2 terminal from your windows if that is previously installed.
  2. Run the command pacman -S --needed base-devel mingw-w64-x86_64-toolchain
  3. You will be asked to select the option from the list. You should select the option which refers to mingw-w64-x86_64-make.
  4. Once the installation is successfully done, then open CodeLite settings->Buid Settings and check your Make file location. If that is empty or showing an unknown location then click the three dots at the very right of that box. The browse and navigate to location or where you installed the make by pacman. In my case it is C:/msys64/usr/bin/make.exe.

enter image description here

  1. Click Apply and Save.
  2. Now it might be needed to create a fresh workspace and re-run your code.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文