PDA

View Full Version : Can someone decode this linker error??


guyenfedora000
17th August 2007, 07:52 AM
I am getting all these weird errors.
I dont know what these sp, dp, gp, ip references are: Can someone more experienced than me explain it? Thanks!
g++ -c -ggdb -W main.c
g++ -c -ggdb -W util.c
g++ -c -ggdb -W global.c
g++ -c -ggdb -W print.c
g++ -c -ggdb -W shell1.c
g++ -c -ggdb -W shell3.c

g++ -o main.out main.o util.o global.o print.o shell1.o shell3.o
util.o: In function `MemInodeAlloc()':
/home/gguyen/Desktop/dev/cs360a/util.c:837: multiple definition of `sp'
main.o:/home/gguyen/Desktop/dev/cs360a/main.c:22: first defined here
util.o: In function `MemInodeAlloc()':
/home/gguyen/Desktop/dev/cs360a/util.c:837: multiple definition of `gp'
main.o:/home/gguyen/Desktop/dev/cs360a/main.c:22: first defined here
util.o: In function `MemInodeAlloc()':
/home/gguyen/Desktop/dev/cs360a/util.c:839: multiple definition of `ip'
main.o:/home/gguyen/Desktop/dev/cs360a/main.c:22: first defined here
util.o: In function `MemInodeAlloc()':
/home/gguyen/Desktop/dev/cs360a/util.c:839: multiple definition of `dp'

guyenfedora000
17th August 2007, 08:04 AM
I am getting all these weird errors.
I dont know what these sp, dp, gp, ip references are: Can someone more experienced than me explain it? Thanks!
g++ -c -ggdb -W main.c
g++ -c -ggdb -W util.c
g++ -c -ggdb -W global.c
g++ -c -ggdb -W print.c
g++ -c -ggdb -W shell1.c
g++ -c -ggdb -W shell3.c

g++ -o main.out main.o util.o global.o print.o shell1.o shell3.o
util.o: In function `MemInodeAlloc()':
/home/gguyen/Desktop/dev/cs360a/util.c:837: multiple definition of `sp'
main.o:/home/gguyen/Desktop/dev/cs360a/main.c:22: first defined here
util.o: In function `MemInodeAlloc()':
/home/gguyen/Desktop/dev/cs360a/util.c:837: multiple definition of `gp'
main.o:/home/gguyen/Desktop/dev/cs360a/main.c:22: first defined here
util.o: In function `MemInodeAlloc()':
/home/gguyen/Desktop/dev/cs360a/util.c:839: multiple definition of `ip'
main.o:/home/gguyen/Desktop/dev/cs360a/main.c:22: first defined here
util.o: In function `MemInodeAlloc()':
/home/gguyen/Desktop/dev/cs360a/util.c:839: multiple definition of `dp'
never mind. found it. Thanks!!!

Hachioji Photos - Hyderabad Instagram Photos - Lebanon Travel Photos on Instagram -