what is _this_?!

what is _this_?!

Post by denn » Thu, 28 Oct 1999 04:00:00



     crl7% gcc //www/users/de/dennes/suck.txt
     ld: //www/users/de/dennes/suck.txt: bad magic number
     crl8%

anyone have a clue what this means?

that's how i compile suck.txt, right?

octinomos
____________________________________________

I am Baphomet, that is the Eightfold Word that
shall be equilibrated with the Three.  (bk.370 v.19)                            

 
 
 

what is _this_?!

Post by denn » Thu, 28 Oct 1999 04:00:00


+      crl7% gcc //www/users/de/dennes/suck.txt
+      ld: //www/users/de/dennes/suck.txt: bad magic number
+      crl8%
+
+ anyone have a clue what this means?
+
+ that's how i compile suck.txt, right?

oopsie, i forgot about the extension...

i changed it to suck.c and i didn't get an error.

so supposedly it's compiled now right?

now, how do i execute it?

octinomos
____________________________________________

I am Baphomet, that is the Eightfold Word that
shall be equilibrated with the Three.  (bk.370 v.19)                            

 
 
 

what is _this_?!

Post by Robert B. Rossman » Thu, 28 Oct 1999 04:00:00



>      crl7% gcc //www/users/de/dennes/suck.txt
>      ld: //www/users/de/dennes/suck.txt: bad magic number
>      crl8%

> anyone have a clue what this means?

> that's how i compile suck.txt, right?

> octinomos
> ____________________________________________

> I am Baphomet, that is the Eightfold Word that
> shall be equilibrated with the Three.  (bk.370 v.19)

I don`t think that gcc likes the txt extension.
Use .c or .cpp

Robert

 
 
 

what is _this_?!

Post by Robert B. Rossman » Thu, 28 Oct 1999 04:00:00




> +      crl7% gcc //www/users/de/dennes/suck.txt
> +      ld: //www/users/de/dennes/suck.txt: bad magic number
> +      crl8%
> +
> + anyone have a clue what this means?
> +
> + that's how i compile suck.txt, right?

> oopsie, i forgot about the extension...

> i changed it to suck.c and i didn't get an error.

> so supposedly it's compiled now right?

> now, how do i execute it?

> octinomos
> ____________________________________________

> I am Baphomet, that is the Eightfold Word that
> shall be equilibrated with the Three.  (bk.370 v.19)

In general gcc builds a a.out file
use
./a.out

Robert

 
 
 

what is _this_?!

Post by Rainer Temm » Thu, 28 Oct 1999 04:00:00



>      crl7% gcc //www/users/de/dennes/suck.txt
>      ld: //www/users/de/dennes/suck.txt: bad magic number
>      crl8%

> anyone have a clue what this means?

> that's how i compile suck.txt, right?

Hi octinomos,

the assumtion of the compiler is, that files not ending with .c (or .cpp) don't
need to be compiled. That's whay they are passed to the linker directly.
The linker reads the first few bytes from the file (looking for a certain magic number)
to see what it is (object, library, shared-object).
Obviously your text-file contains plain text. Should it be a C-Prog, you might
give it a try and rename it to myfault.c and compile it.
Otherwise the whole approach is nonsens.

Regards Rainer

 
 
 

what is _this_?!

Post by denn » Thu, 28 Oct 1999 04:00:00



+ > so supposedly it's compiled now right?
+ >
+ > now, how do i execute it?
+ >
+
+ In general gcc builds a a.out file
+ use
+ ./a.out
+
+ Robert

hahahahaha!

it worked, thanks!!!

:)

i'm programming in C at home....  life is good....

octinomos
____________________________________________

I am Baphomet, that is the Eightfold Word that
shall be equilibrated with the Three.  (bk.370 v.19)                            

 
 
 

what is _this_?!

Post by Peter Seeba » Thu, 28 Oct 1999 04:00:00




>     crl7% gcc //www/users/de/dennes/suck.txt
>     ld: //www/users/de/dennes/suck.txt: bad magic number
>     crl8%
>anyone have a clue what this means?

Yes.

Quote:>that's how i compile suck.txt, right?

No, because the compiler has no reason to believe that 'suck.txt' is any
kind of source, so it assumes it's an object module that you want to link.
Rename it to 'suck.c'.

-s
--

C/Unix wizard, Pro-commerce radical, Spam fighter.  Boycott Spamazon!
Will work for interesting hardware.  http://www.plethora.net/~seebs/
Visit my new ISP <URL:http://www.plethora.net/> --- More Net, Less Spam!

 
 
 

what is _this_?!

Post by Douglas W. Goodal » Fri, 29 Oct 1999 04:00:00


gcc has a command line parameter for specifying the executable name
Doug


> + > so supposedly it's compiled now right?
> + >
> + > now, how do i execute it?
> + >
> +
> + In general gcc builds a a.out file
> + use
> + ./a.out
> +
> + Robert

> hahahahaha!

> it worked, thanks!!!

> :)

> i'm programming in C at home....  life is good....

> octinomos
> ____________________________________________

> I am Baphomet, that is the Eightfold Word that
> shall be equilibrated with the Three.  (bk.370 v.19)