Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Eclipse Mars settings(ready to program?)
Eclipse Mars settings [message #1744029] Wed, 21 September 2016 14:18 Go to next message
Massimo Mancini is currently offline Massimo ManciniFriend
Messages: 24
Registered: September 2016
Junior Member
Dear all,
thanks for your help.

I am a beginner using Eclipse and I really wish to get deep into using it.
Starting using it, I have to admit that I can hardly understand if it is well setted because anytime I am writing a code, there is no way to build and lounch it.

The program I am writing are simple examples of some exercise coming from a learning book "Deitel & Deitel" ...

The point is, if I copy the exactly code in the new file of a new C program, it doesn't work anything, nor building nor lounching.

How can I solve this problem once for all? What really does change from other IDE?

In my last topic I did ask more or less the same question and I've learned that when I have to printf ..., I have to add fflush(stdout); otherwise it doesn't charge the integer ...

How to understand settings?


Here we are, another example of a very simple program which drive me crazy today:

#include <stdio.h>

int main( void )
{
int x;

for ( x = 1; x <= 10; x++ ) {

if ( x == 5 ) {
break;
}

printf( "%d ", x );
}

printf( "\nBroke out of loop at x == %d\n" , x );

return 0;
}


The console is dislaying: ".. no progam to build"....




Thanks for any advice.
Massimo
Re: Eclipse Mars settings [message #1744042 is a reply to message #1744029] Wed, 21 September 2016 16:30 Go to previous messageGo to next message
Tauno Voipio is currently offline Tauno VoipioFriend
Messages: 715
Registered: August 2014
Senior Member
Open your Eclipse, click Help -> Help Contents -> C/C++ Development User Guide -> Before you begin, and follow the instructions there.

If you still have problems, please tell:
- which operating system,
- if Windows, which help layer (MinGW, Cygwin ...),
- what did you do to get the error message



--

Tauno Voipio
Re: Eclipse Mars settings [message #1744047 is a reply to message #1744042] Wed, 21 September 2016 18:07 Go to previous messageGo to next message
Massimo Mancini is currently offline Massimo ManciniFriend
Messages: 24
Registered: September 2016
Junior Member
Yep, sorry

I use :
1) windows 8.1
2)MinGW

I did receive the error message after trying to debug or release the code.

Re: Eclipse Mars settings [message #1744049 is a reply to message #1744047] Wed, 21 September 2016 18:28 Go to previous messageGo to next message
Tauno Voipio is currently offline Tauno VoipioFriend
Messages: 715
Registered: August 2014
Senior Member
Did you read and follow the Eclipse CDT instructions?

If it still does not work, you can try to compile and run from MSYS console.


--

Tauno Voipio
Re: Eclipse Mars settings [message #1744134 is a reply to message #1744049] Thu, 22 September 2016 15:00 Go to previous messageGo to next message
Massimo Mancini is currently offline Massimo ManciniFriend
Messages: 24
Registered: September 2016
Junior Member
Yes Tauno, I did follow the CDT instruction step by step, even with a video tutorial.
By the way, I am going to try with the MSYS console.

I'll keep you informed.
Thanks again for the moment.
Re: Eclipse Mars settings [message #1744251 is a reply to message #1744134] Fri, 23 September 2016 15:28 Go to previous messageGo to next message
Massimo Mancini is currently offline Massimo ManciniFriend
Messages: 24
Registered: September 2016
Junior Member
Hello Tauno,
I did find the reason why it didn't work. The point is that when I create a new project I did use to save it into the default location, which is not allowed (as explained in CDT).

All did run well except the same thing as my previous topic: it doesn't open output file. Here as follow the comment from the Console:

17:20:41 **** Incremental Build of configuration Release for project while ****
Info: Internal Builder is used for build
gcc -O3 -Wall -c -fmessage-length=0 -o "src\\while.o" "..\\src\\while.c"
gcc -o while.exe "src\\while.o"
c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.9.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot open output file while.exe: Permission denied
collect2.exe: error: ld returned 1 exit status

I did search for explanation but I can't find any.

Thanks again for any advice.
M
Re: Eclipse Mars settings [message #1744263 is a reply to message #1744251] Fri, 23 September 2016 16:49 Go to previous messageGo to next message
Massimo Mancini is currently offline Massimo ManciniFriend
Messages: 24
Registered: September 2016
Junior Member
I forgot to say that if I add flush ( stout ); it doesn't happen anything.

M
Re: Eclipse Mars settings [message #1744275 is a reply to message #1744251] Fri, 23 September 2016 19:58 Go to previous messageGo to next message
Tauno Voipio is currently offline Tauno VoipioFriend
Messages: 715
Registered: August 2014
Senior Member
It is a Windows property that you cannot build a new version of an .exe, if the previous copy is running. The error message is what you're seeing.

Check that you have stopped and killed the previous run attempts before building a new version.


--

Tauno Voipio
Re: Eclipse Mars settings [message #1744299 is a reply to message #1744275] Sat, 24 September 2016 11:06 Go to previous messageGo to next message
Massimo Mancini is currently offline Massimo ManciniFriend
Messages: 24
Registered: September 2016
Junior Member
I understand but how is it possible? after one hour there is still no feedback by the console.
Re: Eclipse Mars settings [message #1744300 is a reply to message #1744299] Sat, 24 September 2016 11:14 Go to previous message
Massimo Mancini is currently offline Massimo ManciniFriend
Messages: 24
Registered: September 2016
Junior Member
I solved it.
The reason why I didn't succeeded it's because at the console I didn't enter the input but the point is that there is no evidence of inputs' requirements. Now I understand, it should be written better the code.

Thanks again Tauno and have a nice weekend.
Massimo
Previous Topic:Canceling a build -> every next build will have an error.
Next Topic:Compilation Terminated
Goto Forum:
  


Current Time: Sat May 28 10:54:54 GMT 2022

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

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

Back to the top