Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Error when using mingw toolchain
Error when using mingw toolchain [message #1779408] Sat, 06 January 2018 18:03 Go to next message
Viktor Ivanov is currently offline Viktor IvanovFriend
Messages: 1
Registered: January 2018
Junior Member
I am getting this exception when I enable CDT GCC Built-in Compiler Settings MinGW

Version: Neon.3 Release (4.6.3)
Build id: 20170314-1500

!ENTRY org.eclipse.cdt.managedbuilder.core 4 0 2018-01-07 02:56:33.773
!MESSAGE Unable to find compiler command in toolchain=cdt.managedbuild.toolchain.gnu.mingw.base
!STACK 0
java.lang.Exception
	at org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin.error(ManagedBuilderCorePlugin.java:226)
	at org.eclipse.cdt.managedbuilder.language.settings.providers.ToolchainBuiltinSpecsDetector.getCompilerCommand(ToolchainBuiltinSpecsDetector.java:124)
	at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.resolveCommand(AbstractBuiltinSpecsDetector.java:308)
	at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.calculateEnvHash(AbstractBuiltinSpecsDetector.java:422)
	at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.validateEnvironment(AbstractBuiltinSpecsDetector.java:466)
	at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.execute(AbstractBuiltinSpecsDetector.java:481)
	at org.eclipse.cdt.managedbuilder.language.settings.providers.AbstractBuiltinSpecsDetector.registerListener(AbstractBuiltinSpecsDetector.java:375)
	at org.eclipse.cdt.internal.core.language.settings.providers.LanguageSettingsProvidersSerializer.reRegisterListeners(LanguageSettingsProvidersSerializer.java:1375)
	at org.eclipse.cdt.internal.core.settings.model.xml.XmlProjectDescriptionStorage.setCurrentDescription(XmlProjectDescriptionStorage.java:386)
	at org.eclipse.cdt.internal.core.settings.model.SetCProjectDescriptionOperation.executeOperation(SetCProjectDescriptionOperation.java:137)
	at org.eclipse.cdt.internal.core.model.CModelOperation.execute(CModelOperation.java:341)
	at org.eclipse.cdt.internal.core.model.CModelOperation.run(CModelOperation.java:607)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267)
	at org.eclipse.cdt.internal.core.model.CModelOperation.runOperation(CModelOperation.java:638)
	at org.eclipse.cdt.internal.core.settings.model.AbstractCProjectDescriptionStorage.setProjectDescription(AbstractCProjectDescriptionStorage.java:203)
	at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionStorageManager.setProjectDescription(CProjectDescriptionStorageManager.java:149)
	at org.eclipse.cdt.internal.core.settings.model.CProjectDescriptionManager.setProjectDescription(CProjectDescriptionManager.java:853)
	at org.eclipse.cdt.managedbuilder.internal.core.BuildSettingsUtil.checkApplyDescription(BuildSettingsUtil.java:211)
	at org.eclipse.cdt.managedbuilder.core.ManagedBuildManager.updateCoreSettings(ManagedBuildManager.java:1575)
	at org.eclipse.cdt.build.internal.core.scannerconfig.CfgDiscoveredPathManager$1.run(CfgDiscoveredPathManager.java:154)
	at org.eclipse.cdt.internal.core.model.BatchOperation.executeOperation(BatchOperation.java:36)
	at org.eclipse.cdt.internal.core.model.CModelOperation.execute(CModelOperation.java:341)
	at org.eclipse.cdt.internal.core.model.CModelOperation.run(CModelOperation.java:607)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267)
	at org.eclipse.cdt.core.model.CoreModel.run(CoreModel.java:1219)
	at org.eclipse.cdt.core.model.CoreModel.run(CoreModel.java:1180)
	at org.eclipse.cdt.build.internal.core.scannerconfig.CfgDiscoveredPathManager.updateCoreSettings(CfgDiscoveredPathManager.java:157)
	at org.eclipse.cdt.build.core.scannerconfig.ScannerConfigBuilder.build(ScannerConfigBuilder.java:125)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:301)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383)
	at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:487)
	at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:406)
	at org.eclipse.ui.actions.BuildAction$1.runInWorkspace(BuildAction.java:285)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Re: Error when using mingw toolchain [message #1779588 is a reply to message #1779408] Wed, 10 January 2018 02:35 Go to previous message
Andrey Sotnikov is currently offline Andrey SotnikovFriend
Messages: 21
Registered: October 2014
Junior Member
The message says: "Unable to find compiler command in toolchain". Make sure you have the gcc compiler in your PATH environment variable.

If you don't have MinGW gcc, then

  1. Install MSYS2 from here: http://www.msys2.org/
  2. In MSYS command line issue 'pacman -S mingw-w64-x86_64-toolchain' or 'pacman -S mingw-w64-i686-toolchain' depending on whether you want 64 or 32 bits MinGW gcc toolchain.
  3. Add the full path to either mingw64\bin or mingw32\bin to your PATH depending on the bitness you installed.
  4. Restart eclipse.

If you already have gcc, it is in your PATH, but still doesn't work, start procmon (https://docs.microsoft.com/en-us/sysinternals/downloads/procmon) and check what particular file CDT is looking for.
Previous Topic:Integrate Docker GDB container in Eclipse with host gdb-server
Next Topic: Symbol 'mkldnn_f32' could not be resolved
Goto Forum:
  


Current Time: Sat Aug 18 04:30:48 GMT 2018

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

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

Back to the top