Date: Tue, 4 May 1999 23:35:44 +0100 From: Mark Ovens <marko@uk.radan.com> To: Tomas Reilly <thomas.reilly@nuigalway.ie> Cc: freebsd-questions@freebsd.org Subject: Re: Exec format error. Wrong Architecture. Message-ID: <19990504233544.B419@marder-1> In-Reply-To: <372EFDFE.A06728F8@nuigalway.ie>; from Tomas Reilly on Tue, May 04, 1999 at 03:02:38PM %2B0100 References: <372EFDFE.A06728F8@nuigalway.ie>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 04, 1999 at 03:02:38PM +0100, Tomas Reilly wrote:
> Hi there!
> I keep getting the following error when i try to run any c programs:
> for example using a simple test program like
> tom.c
>
> #include<stdio.h>
>
> void main(void)
> {
>
> int x;
>
> printf("X is %d\n",x);
>
> }
>
> i give the following command:
>
> gcc -o tom -c tom.c
^^
You don't want this. ``-c'' tells the compiler to just compile
(i.e. not link). This would normally produce tom.o, but the ``-o
tom'' says to name the output file ``tom''. IOW you are trying to
execute an object file, not an executable binary.
HTH
>
> and i get this when i run the executable tom:
>
> ./tom:Exec format error. Wrong Architecture.
>
> Why does this happen? and how do i fix this?
>
> Any help would be greatly appreciated!
>
>
>
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
>
--
FreeBSD - The Power To Serve http://www.freebsd.org
My Webpage http://www.users.globalnet.co.uk/~markov
_______________________________________________________________
Mark Ovens, CNC Apps Engineer, Radan Computational Ltd. Bath UK
CAD/CAM solutions for Sheetmetal Working Industry
mailto:marko@uk.radan.com http://www.radan.com
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990504233544.B419>
