Can'r run makefile in Linux using PuTTY, plase help!

  • Thread starter Thread starter Alecken
  • Start date Start date
A

Alecken

First of all I want to be honest that I know nothing with either Linux or C/C++ language. I'm a web developer and I'm the only one here. My company is a small company with only 5 people.
While developing my web application, I came up with an md5 executable file that is used for login purpose. This md5 file is used to manage users' login in solaris. But since we're migrating to Linux, the md5 is not working anymore and I was told I need to create a new md5 executable file for Linux from the source files.

I need help and I hope I submitted this to the right Forum, Thanks.

I have several files, some ending in .c, .o and .h and one makefile file, here are their names:
--------------------------------
basic.h
md5, md5.c, md5.h, md5.o
makefile
md5test.c, md5test.o, md5test.h
usbreak.c, usbreak,o, usbreak.h
utils.c, utils.o, utils.h

Within makefile, you'll see this:
----------------------------
md5: md5test.o md5.o utils.o usrbreak.o
gcc md5test.o md5.o utils.o usrbreak.o -o md5

md5test.o: md5test.c
gcc -c md5test.c

md5.o: md5.h md5.c
gcc -c md5.c

utils.o: usrbreak.h utils.h utils.c
gcc -c utils.c

usrbreak.o: usrbreak.h basic.h usrbreak.c
gcc -c usrbreak.c
clean:
rm *.o md5

-----------------------------------------------------------
So, after some googling and reading I opened my PuTTy and start typing the following:
(I'm on my root folder /home/www/mytest/ and those source files are in mytest folder.)
-----------------------------------------------------------

# make -f makefile

and I got this:
-------------

gcc md5test.o md5.o utils.o usrbreak.o -o md5
/usr/bin/ld: md5test.o: Relocations in generic ELF (EM: 2)
md5test.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make: *** [md5] Error 1

I don't know what this error is and how to interpret them and what should I do next. Please help!!

Continue reading...
 
Back
Top