Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » [Problem] Can't use MinGW toolchain, even if MinGW is installed.(Can't compile Windows programs in a Linux system.)
[Problem] Can't use MinGW toolchain, even if MinGW is installed. [message #1850907] Tue, 22 March 2022 01:08 Go to next message
Guido Barbieri is currently offline Guido BarbieriFriend
Messages: 2
Registered: March 2022
Junior Member
Hi, I'm trying to compile Windows programs under a Linux system using Eclipse.
I can compile Linux programs without issues, however, I can't do the same for Windows programs.
The problem is that I can't select MiniGW as a toolchain when trying to compile code.
If I force it by selecting it in Properties<C/C++ Build<Tool Chain editor it will say "Tool chain MinGW is not detected".

How can I get this to work? I'm using Clear Linux, I installed the MinGW bundle from it's official repository.

MinGW stuff appears on usr/bin, yet I'm not managing to get this working properly.
Any help is appreciated,. thanks!

EDIT: Basically, what I want to do is for MinGW to show in the wizard when creating a C/C++ project, alongside the Linux GCC compiler, so I can compile binaries for both Windows and Linux.
A workaround I found is to use my MinGW prefix and path in "Cross GCC" and that seems to work, but it's not the solution I was looking for, since the MinGW toolchain still doesn't appear alongside the Linux GCC toolchain in the wizard and it's not as practical as I was hoping for.

[Updated on: Tue, 22 March 2022 03:34]

Report message to a moderator

Re: [Problem] Can't use MinGW toolchain, even if MinGW is installed. [message #1850933 is a reply to message #1850907] Tue, 22 March 2022 17:34 Go to previous messageGo to next message
Joost Kraaijeveld is currently offline Joost KraaijeveldFriend
Messages: 273
Registered: July 2009
Senior Member
Hi,

Create a cross compiler project, use the correct prefix for the cross compiler, e.g. x86_64-w64-mingw32- (Debian) and path, e.g. /usr/bin . That works on Debian.



Cheers,

Joost
Re: [Problem] Can't use MinGW toolchain, even if MinGW is installed. [message #1850936 is a reply to message #1850933] Tue, 22 March 2022 20:09 Go to previous message
Guido Barbieri is currently offline Guido BarbieriFriend
Messages: 2
Registered: March 2022
Junior Member
Thanks for the answer! Yes, that's what I'm doing right now for cross compile and it works.

But, I was hoping to have something like this in the C/C++ wizard:
https://www.pascal-man.com/gpu-cuda/image-mingw/mingw-C-project-example.PNG

You can see that MinGW appears there, directly without the need of using the Cross GCC compiler. In my case since I use a Linux system, MinGW is replaced with the Linux GCC compiler, but I was wondering if it's possible to add in the toolchain window the MinGW option on my Linux system.

I repeat, I can compile with Cross GCC without issues when I put the prefix and path, but, I would like to add the MinGW option like the image above shows, I'm not sure if this is possible to do, but I can't think why it shouldn't be either. As of now, If I force it by selecting it in Properties < C/C++ Build < Tool Chain editor, it will say "Tool chain MinGW is not detected".

Thanks in advance!

[Updated on: Tue, 22 March 2022 20:12]

Report message to a moderator

Previous Topic:recognizing .proto extensions
Next Topic:Build from Command Line with Post-build steps
Goto Forum:
  


Current Time: Fri Apr 19 13:32:21 GMT 2024

Powered by FUDForum. Page generated in 0.01848 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top