From: Kevin Nathan on 8 Sep 2009 02:40 On Mon, 07 Sep 2009 23:10:22 -0700 joe cipale <j_cipale(a)yahoo.com> wrote: >Okay... this does compile. They problem I am seeing now is that when I >attempt to run it, I get the following: >/hello.o >./hello.o: Exec format error. Binary file not executable. > >When I check the file type, it looks okay: >joec 15% >file hello.o >hello.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), >not stripped > hello.o is an object file and needs to be linked to be runnable. Take off the '-c' on your compile line and you should get an executable named 'a.out'. If you want it named 'hello', add ' -o hello' to the command line. -- Kevin Nathan (Arizona, USA) Linux Potpourri and a.o.l.s. FAQ -- (temporarily offline) Open standards. Open source. Open minds. The command line is the front line. Linux 2.6.25.20-0.5-pae 11:37pm up 18 days 7:33, 35 users, load average: 1.12, 1.05, 0.99
From: Eef Hartman on 8 Sep 2009 04:29 houghi wrote: > I have it installed: > houghi(a)penne : which g++ > /usr/bin/g++ > > pin gives me: > > pin 0.38 - package info for g++ > > ------------------------------------------------------------------ > *** no rpm named g++ installed > ------------------------------------------------------------------ With a command like rpm -qf /usr/bin/g++ you can find out which package a file on your system belongs TOO (as long as it belongs to an installed package, of course). Doing that here gives me here gcc-c++ (and the version) as the package name -- Eef Hartman, Delft University of Technology, dept. SSC/ICT
From: Kevin Nathan on 8 Sep 2009 14:13 On Tue, 8 Sep 2009 11:20:17 +0200 houghi <houghi(a)houghi.org.invalid> wrote: >The standard I use then is `pin g++` which in the past gave me the >needed information. Stangely I now do not get the expected result. e.g. >`pin slrn.rc` even though slrn is installed. Strange. > Refresh your ARCHIVES.gz file, maybe? Or do a zgrep on it, see what you find . . . -- Kevin Nathan (Arizona, USA) Linux Potpourri and a.o.l.s. FAQ -- (temporarily offline) Open standards. Open source. Open minds. The command line is the front line. Linux 2.6.25.20-0.5-pae 11:13am up 18 days 19:08, 35 users, load average: 0.31, 0.68, 0.69
From: Kevin Nathan on 8 Sep 2009 18:35 On Wed, 9 Sep 2009 00:20:31 +0200 houghi <houghi(a)houghi.org.invalid> wrote: >Oh and I have edited pin again for a better layout. Nice! I will have to apply those changes to mine . . . :-) -- Kevin Nathan (Arizona, USA) Linux Potpourri and a.o.l.s. FAQ -- (temporarily offline) Open standards. Open source. Open minds. The command line is the front line. Linux 2.6.25.20-0.5-pae 3:34pm up 18 days 23:30, 35 users, load average: 0.32, 0.51, 0.71
From: joe cipale on 9 Sep 2009 00:07
On Mon, 07 Sep 2009 23:40:16 -0700, Kevin Nathan wrote: > hello.o is an object file and needs to be linked to be runnable. Take off > the '-c' on your compile line and you should get an executable named > 'a.out'. If you want it named 'hello', add ' -o hello' to the command > line. Thanks for your help. That did the trick (slinkimg back into my cave now) Joe |