Hello! Friends,
I am getting this strange error as shown below when the both object files are linked to get the executable after make command: -
obj/Sample_func.o:Sample_func.cpp:(.data+0x20): multiple definition of `maskbit'
obj/Samplei.o:Sample.cpp:(.data+0x20): first defined here
obj/Sample_func.o:Sample_func.cpp:(.data+0xa0): multiple definition of `mask'
obj/Sample.o:Sample.cpp:(.data+0xa0): first defined here
collect2: ld returned 1 exit status
obj/Sample_func.o:Sample_func.cpp:(.data+0x20): multiple definition of `maskbit'
obj/Samplei.o:Sample.cpp:(.data+0x20): first defined here
obj/Sample_func.o:Sample_func.cpp:(.data+0xa0): multiple definition of `mask'
obj/Sample.o:Sample.cpp:(.data+0xa0): first defined here
collect2: ld returned 1 exit status
To copy to clipboard, switch view to plain text mode
I mean am not able to see where the error is, so till now not able to solve it.
I know its not Qt question but C++ problem but,Can anyone please help me out in this and tell me on which line the error could be. I will be grateful.
Thanks in advance.
Bookmarks