Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Eclipse with msys2 - 'Hello world' not compiling
Eclipse with msys2 - 'Hello world' not compiling [message #1855788] Thu, 03 November 2022 09:29 Go to next message
Robert Simpson is currently offline Robert SimpsonFriend
Messages: 6
Registered: October 2018
Junior Member
Fresh install of Eclipse Version: 2022-09 (4.25.0)
Fresh install of msys2 (64 bit)
Running on Windows 10

Added PATH, and set include path in project settings.

Created new 'hello world' project.

Build project shows:
09:20:14 **** Build of configuration Debug for project test2 ****
make all 
Building file: ../src/test2.cpp
Invoking: Cross G++ Compiler
g++ -I"C:\msys64\usr\lib\gcc\x86_64-pc-msys\11.3.0\include\c++" -IC:\msys64\mingw64\include -I"C:\msys64\usr\include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/test2.d" -MT"src/test2.o" -o "src/test2.o" "../src/test2.cpp"
make: *** [src/test2.o] Error -1073741502
"make all" terminated with exit code 2. Build might be incomplete.

09:20:15 Build Failed. 1 errors, 0 warnings. (took 1s.813ms)


In the 'problems' tab:
#include <iostream>
shows no issues but
using namespace std;
says 'Symbol std could not be resolved'

It works ok from a cmd prompt:

C:\Users\xxx\eclipse-workspace\test2\Debug>g++ -I"C:\msys64\usr\lib\gcc\x86_64-pc-msys\11.3.0\include\c++" -IC:\msys64\mingw64\include -I"C:\msys64\usr\include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/test2.d" -MT"src/test2.o" -o "src/test2.o" "../src/test2.cpp"

C:\Users\xxx\eclipse-workspace\test2\Debug>ls src
subdir.mk  test2.d  test2.o



I've had Eclipse working in the past but it was many years ago (Helios I think). I need a recent version of gcc so using a basic mingw install didn't work.

Any ideas how to get Eclipse to work with msys2?

Re: Eclipse with msys2 - 'Hello world' not compiling [message #1855969 is a reply to message #1855788] Sun, 13 November 2022 08:46 Go to previous message
Robert Simpson is currently offline Robert SimpsonFriend
Messages: 6
Registered: October 2018
Junior Member
I was not able to get even a simple example working using Eclipse project files.

Conclusion: Wrote makefiles for the whole project. Got it compiling with gcc and then was able to use Eclipse by opening the project as a makefile project.
Previous Topic:Re: CDT mashing args to gdb
Next Topic:Run compiled windows binary
Goto Forum:
  


Current Time: Wed Nov 13 03:25:33 GMT 2024

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

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

Back to the top