Linker exit code 1
i was programming and once i elimated all errors except for one can you tell me what it is so i can fix it.
the console is showing this message: clang version 7.0.0-3~ubuntu0.18.04.1 (tags/RELEASE_700/final)
clang++-7 -pthread -o main Game.cpp main.cpp
/tmp/main-92a71b.o: In function menu()':
main.cpp:(.text+0x0): multiple definition of
menu()'
/tmp/Game-9970b6.o:Game.cpp:(.text+0x0): first defined here
clang: error: linker command failed with exit code 1 (use -v to see invocation)
compiler exit status 1
Voters
I took a look at
https://stackoverflow.com/questions/249701/why-arent-my-compile-guards-preventing-multiple-definition-inclusions
and it seems the linker doesn't like it when you define stuff in places that have multiple inclusions.
I changed
functions.h
to
functions.h
and added a file:
functions.c
https://repl.it/@mwilki7/wild-battle-encounter
@mwilki7 awesome! thanks for resolving it.