I’m sure I am doing something wrong but… I worked on a c++ project on one computer, with same version of Ubuntu installed, same version of g++, it compiled fine there. I put the files into a DropBox folder so that I could work on it at home, the same exact files are here, and the same exact g++ command results in errors. It is giving me several “multiple definition of ‘_‘ ” errors.
Does anyone know what I am doing wrong here?
Example error:
g++ -o*.C *.cpp
/tmp/ccdFZtkq.o:(.bss+0x718): multiple definition of `done'
The problem was that DropBox was appending suffixes to files that I can best describe as being in “intermediate” states. DropBox also created files without the suffixes that were not in the intermediate states. I am still unsure quite what was happening, but sometime as g++ ran, it was using both the intermediate files and the non-intermediate ones, thereby running into issues of basically the same files being loaded multiple times.
I solved my problem by removing the files from the DropBox folder and recompiling, worked perfectly fine then.