problem compiling with Eclipse for linux

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Feb 2008
Posts: 25
Reputation: onemanclapping is an unknown quantity at this point 
Solved Threads: 0
onemanclapping onemanclapping is offline Offline
Light Poster

problem compiling with Eclipse for linux

 
0
  #1
Feb 22nd, 2008
hi,

I'm beginning to learn how to program in C++ and though it is teached in my university, it seems noone cares about Linux users, so no one there can help me here (though I think the problem has nothing to do with my OS, but with the version of the program I use: eclipe)

the problem is the following:

http://img409.imageshack.us/img409/9127/eclipse1da1.png

when I try to run this, this new window pops up and I've filled the necessary camps as far as I could, but I don't know what to put where it says "C/C++ Application:"

http://img184.imageshack.us/img184/5857/eclipse2cc8.png

when I click "Search Project" that right side window pops up empty... what am I doing wrong?

thanks in advance,

onemanclapping

PS: sorry for the bad english, I'm portuguese
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 1,496
Reputation: WolfPack has a spectacular aura about WolfPack has a spectacular aura about WolfPack has a spectacular aura about 
Solved Threads: 104
Moderator
WolfPack's Avatar
WolfPack WolfPack is offline Offline
Mentally Challenged Mod.

Re: problem compiling with Eclipse for linux

 
0
  #2
Feb 23rd, 2008
I have not used eclipse, so I don't know exactly what steps are needed. But I don't think there is any problem with your eclipse version. Looks like you are adding the source file to the .settings folder. Also the file does not have the extension of a C++ source file.

Try right clicking on the project name and see if there is an option like add source file . If there isn't, try reading the manual of eclipse. Doesn't matter which OS you use, the basic steps should be the same. So even the Windows Manual for eclipse would do.
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 25
Reputation: onemanclapping is an unknown quantity at this point 
Solved Threads: 0
onemanclapping onemanclapping is offline Offline
Light Poster

Re: problem compiling with Eclipse for linux

 
0
  #3
Feb 23rd, 2008
Originally Posted by WolfPack View Post
I have not used eclipse, so I don't know exactly what steps are needed. But I don't think there is any problem with your eclipse version. Looks like you are adding the source file to the .settings folder. Also the file does not have the extension of a C++ source file.

Try right clicking on the project name and see if there is an option like add source file . If there isn't, try reading the manual of eclipse. Doesn't matter which OS you use, the basic steps should be the same. So even the Windows Manual for eclipse would do.
I tried all that but nothing worked... btw, the source file is not in the .settings folder:

http://img262.imageshack.us/img262/3...eenshotfy0.png

I changed the extension to "cpp", it that right? if it is, that's not the problem either

do you know another application to program, compile and run C++ programs under linux?
Last edited by onemanclapping; Feb 23rd, 2008 at 1:16 pm.
Reply With Quote Quick reply to this message  
Join Date: Oct 2006
Posts: 222
Reputation: JRM will become famous soon enough JRM will become famous soon enough 
Solved Threads: 14
JRM's Avatar
JRM JRM is offline Offline
Posting Whiz in Training

Re: problem compiling with Eclipse for linux

 
0
  #4
Feb 23rd, 2008
code::blocks is a good IDE
If you just want to compile a program
use the g++ compiler
on the command line:
g++ myprog.cpp -o myprog
this will compile myprog.cpp source into myprog executable.

To run it ;
./myprog
"I like beating by head against the wall because it feels so good when I stop"
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 98
Reputation: codeaa is an unknown quantity at this point 
Solved Threads: 12
codeaa codeaa is offline Offline
Junior Poster in Training

Re: problem compiling with Eclipse for linux

 
0
  #5
Feb 23rd, 2008
Create a source folder. File->New->Source folder. Call it src and save your file there.

Then when that windows comes up when you try to run your program, browse to your debug folder and select the program.
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 25
Reputation: onemanclapping is an unknown quantity at this point 
Solved Threads: 0
onemanclapping onemanclapping is offline Offline
Light Poster

Re: problem compiling with Eclipse for linux

 
0
  #6
Feb 24th, 2008
Originally Posted by codeaa View Post
Create a source folder. File->New->Source folder. Call it src and save your file there.

Then when that windows comes up when you try to run your program, browse to your debug folder and select the program.
now it says "Program is not a recognized executable." selecting the program as you told me (/home/omc/workspace/teste/src/atum.cpp)
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 25
Reputation: onemanclapping is an unknown quantity at this point 
Solved Threads: 0
onemanclapping onemanclapping is offline Offline
Light Poster

Re: problem compiling with Eclipse for linux

 
0
  #7
Feb 24th, 2008
Originally Posted by JRM View Post
code::blocks is a good IDE
If you just want to compile a program
use the g++ compiler
on the command line:
g++ myprog.cpp -o myprog
this will compile myprog.cpp source into myprog executable.

To run it ;
./myprog
where can I download code::blocks? the main site seems not to have anything to download: http://www.codeblocks.org/downloads/15

I'd really prefer a program that would compile itself as it would be very boring to keep repeating that code line (g++ myprog.cpp -o myprog)...
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 978
Reputation: mitrmkar is just really nice mitrmkar is just really nice mitrmkar is just really nice mitrmkar is just really nice mitrmkar is just really nice 
Solved Threads: 208
mitrmkar mitrmkar is offline Offline
Posting Shark

Re: problem compiling with Eclipse for linux

 
0
  #8
Feb 24th, 2008
atum.cpp is a source file, not an executable file. You should locate the program you have compiled i.e. the executable file.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 978
Reputation: mitrmkar is just really nice mitrmkar is just really nice mitrmkar is just really nice mitrmkar is just really nice mitrmkar is just really nice 
Solved Threads: 208
mitrmkar mitrmkar is offline Offline
Posting Shark

Re: problem compiling with Eclipse for linux

 
0
  #9
Feb 24th, 2008
Last edited by mitrmkar; Feb 24th, 2008 at 12:09 pm.
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 25
Reputation: onemanclapping is an unknown quantity at this point 
Solved Threads: 0
onemanclapping onemanclapping is offline Offline
Light Poster

Re: problem compiling with Eclipse for linux

 
0
  #10
Feb 24th, 2008
Originally Posted by mitrmkar View Post
atum.cpp is a source file, not an executable file. You should locate the program you have compiled i.e. the executable file.
that's what I imagined...but where can I compile it under eclipse? is it the "build" option? I've already selected it but it seems not to create any kind of executable file
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC