How to resolve "multiple definitions of _start" compiler error in c++ . I have gone through many answers but nothing helps .
error I got :
(.text+0x0): multiple definition of _start' makefile:45: recipe for target 'SDK' failed /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o:(.text+0x0): first defined here ./src/SDK.o: In function
_fini': (.fini+0x0): multiple definition of _fini' /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o:(.fini+0x0): first defined here ./src/SDK.o:(.rodata+0x0): multiple definition of
_IO_stdin_used' /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o:(.rodata.cst4+0x0): first defined here
My c++ code :
int main() {
cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
return 0;
}
at first this code works , but when I linked a library and changed to c++ 11 standard ,the above mentioned error came .kindly help me
Aucun commentaire:
Enregistrer un commentaire