Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » building C/C++ hello world
building C/C++ hello world [message #901692] Tue, 14 August 2012 07:50 Go to next message
Jan Klapuch is currently offline Jan KlapuchFriend
Messages: 1
Registered: August 2012
Junior Member
Hi,
I need help with initialisation settings of C/C++ Eclipse. I have install C/C++ Eclipse Juno, MinGW and msys. I put C:\Program Files\MinGW\bin to the PATH and Build "Hello world c++ program" --> Eclipse gave me error:


Description Resource Path Location Type
sh -c "autoreconf -i"
Cannot run program "sh": Launching failed

Error: Program "sh" not found in PATH
PATH=[C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Broadcom\Broadcom 802.11 Network Adapter;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Diskeeper Corporation\ExpressCache\;C:\Program Files\MATLAB\R2010a\runtime\win64;C:\Program Files\MATLAB\R2010a\bin;C:\Program Files\MinGW\bin]
Text_project -1 Configure Problem

What can I do next?

Thank you for any help.
Re: building C/C++ hello world [message #901926 is a reply to message #901692] Wed, 15 August 2012 06:42 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
Well, you created an Autotools project. You should create a normal Executable project and then choose the toolchain you want to use.
see http://www.eclipse.org/forums/index.php/mv/msg/367218/895233/#msg_895233


I think I gave this answer a dozen times during the last weeks. But nobody seems to use the search function!!!!


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: building C/C++ hello world [message #1850181 is a reply to message #901926] Sun, 20 February 2022 03:48 Go to previous messageGo to next message
Yakir Matusovsky is currently offline Yakir MatusovskyFriend
Messages: 1
Registered: February 2022
Junior Member
Is there any answer to this problem say to a Windows user who wants to use autotools via Eclipse? I mean "don't use it" is fine for some but it is a feature of Eclipse - why wouldn't it work?
Re: building C/C++ hello world [message #1850185 is a reply to message #1850181] Sun, 20 February 2022 15:42 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
Autotools is meant for Linux.
It is for configuring a package to build under the current Linux
distribution. It is NOT part of Eclipse.

Yes, you can get it to run under Windows but you'd have to
modify it first. Windows configurations don't change much
so getting at to work under Windows seems pointless.

Re: building C/C++ hello world [message #1850353 is a reply to message #901692] Fri, 25 February 2022 22:36 Go to previous message
Laszlo Zalanyi is currently offline Laszlo ZalanyiFriend
Messages: 1
Registered: February 2022
Junior Member
Hello,

It must be some supertrivial problem but...
I simply can not run or debug the "official" helloworld program. It builds without errors, but when I launch it simply terminates with exit code 0.
This is a gtk version of Helloworld which should pop up a small window with a button, which after pressing should print "Hello world" in terminal.
If I start the binary from terminal (from Debug/ folder e.g) it works.

ubuntu 20.04 eclipse 21-09 versions. Managed c++ project, linux toolchain default settings. External build. The debug/run configuration by default set correctly, points to the executable which is there as I wrote I can run it from terminal.

Additional infos:

Sometimes , I don't know why it works. Window pops up and program runs say in debug mode. After I stop it it never runs again. There is a popup window - I suppose message but too fast to see what it says.
Starting eclipse from command line there are error messages:

Unable to find full path for "-E"
Unable to find full path for "-E"
Unable to get $PATH.
Unable to find full path for "gcc"
Unable to get $PATH.
Unable to find full path for "-E"
Unable to find full path for "-E"
Unable to find full path for "-std=c++17"
Unable to find full path for "-E"
Unable to find full path for "-std=c++17"

The project build variables obviously have the proper PATH which contains the proper location for gcc. For the other errors I do not understand what they stand for. I haven't found anything about them.


thanks

[Updated on: Sat, 26 February 2022 07:56]

Report message to a moderator

Previous Topic:Compile C files with g++ rather than gcc
Next Topic:where and how to tell eclipse to add something to moc?
Goto Forum:
  


Current Time: Fri Apr 19 22:50:19 GMT 2024

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

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

Back to the top