Well, I changed the debugging with -g instead -O, but still I got the following error message. gcc -g -o memo3 memo3.o -lXm -lXt -lX11 /usr/lib/gcc-lib/i486-suse-linux/3.3/../../../../i486-suse-linux/bin/ld: memo3.o: Relocations in generic ELF (EM: 2) memo3.o: could not read symbols: File in wrong format collect2: ld returned 1 exit status make: *** [memo3] Error 1 What should I do..?
From: Derek Fountain <derekfountain@yahoo.co.uk> To: SuSE English <suse-linux-e@suse.com> Subject: Re: [SLE] linux version of makefile...? Date: Wed, 10 Sep 2003 13:10:05 +0800
On Wednesday 10 September 2003 12:08, Chun Ki Shin wrote:
hi,
I have a following makefile which is used to compile the program at school (solaris, unix system). I want to compile and run same programs at home (suse 8.2)....what do i need to change to compile these....?
It looks to me like you could change the "-O" in the DEBUG variable to a "-g" and it might work.
--
eatapple core dump
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
_________________________________________________________________ Get 10MB of e-mail storage! Sign up for Hotmail Extra Storage. http://join.msn.com/?PAGE=features/es
I changed the debugging with -g instead -O, but still I got the following error message.
gcc -g -o memo3 memo3.o -lXm -lXt -lX11 /usr/lib/gcc-lib/i486-suse-linux/3.3/../../../../i486-suse-linux/bin/ld: memo3.o: Relocations in generic ELF (EM: 2) memo3.o: could not read symbols: File in wrong format collect2: ld returned 1 exit status make: *** [memo3] Error 1
What should I do..?
I'm not entirely sure what you've done so far, but it looks like you might have some old object files (*.o) lying around from the Solaris (or whatever) build. Try a "make clean" then run the build again. --
eatapple core dump
"Chun Ki Shin" <shintuna@hotmail.com> [Wed, 10 Sep 2003 01:12:43 -0400]:
I changed the debugging with -g instead -O, but still I got the following error message.
That option has nothing to do with the error message. -g instructs the compiler to generate debugging info while -On set the optimization level, where n ranges from 0 (no optimization) to 2 (max. optimization). If you want a debugable program, use '-O0 -g' if you want a well optimized program use '-O2'
gcc -g -o memo3 memo3.o -lXm -lXt -lX11 /usr/lib/gcc-lib/i486-suse-linux/3.3/../../../../i486-suse-linux/bin/ld: memo3.o: Relocations in generic ELF (EM: 2) memo3.o: could not read symbols: File in wrong format collect2: ld returned 1 exit status make: *** [memo3] Error 1
You didn't delete the old object files that obviously were compiled on another Platform. Delete them via 'make clean' and the next call of make should run without problems. Philipp [totally useless full quote *including signatures* disposed]
participants (3)
-
Chun Ki Shin
-
Derek Fountain
-
Philipp Thomas