0

Please explain when this error occurs..

duplicate symbol _Firstdata in:
    list.o
    main.o
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
2
Contributors
2
Replies
12
Views
2 Years
Discussion Span
Last Post by Mayukh_1
0

See Firstdata? Whatever that is, you're defining it in list.cpp and again in main.cpp

This is bad. Only define it in one file.

0

Thanks I got this error..it was a stupid linker error...declared the variable with extern in the header and it worked like charm..

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.