I am trying to compile this, but when I run g++, I get this:

tom@griffindor:~/Projects/wermz$ make
g++ -c -Wall -O3 main.cpp -o main.o
g++ -c -Wall -O3 wermz.cpp -o wermz.o
g++ -c -Wall -O3 logger.cpp -o logger.o
g++ -c -Wall -O3 win_funcs.cpp -o win_funcs.o
g++ -c -Wall -O3 lin_funcs.cpp -o lin_funcs.o
g++ -c -Wall -O3 dictionary.cpp -o dictionary.o
g++ main.o wermz.o logger.o win_funcs.o lin_funcs.o dictionary.o -o wermz
wermz.o:(.bss+0x0): multiple definition of `dictionaries'
main.o:(.bss+0x0): first defined here
collect2: ld returned 1 exit status
make: *** [wermz] Error 1

Firstly, why is this?
Secondly, why does it say .bss+0x0 and not the line number?

7 Years
Discussion Span
Last Post by dkalita

>Firstly, why is this?

It's because u are defining dictionary in more than one place
Once in wermz.cpp and once in main.cpp

>Secondly, why does it say .bss+0x0 and not the line number?

It's the object module which is a binary file and hence it doesn't have a line number

Edited by dkalita: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.