Trouble building for arduino

I’ve been struggling for weeks to get this to work in VS code. I gave an existing sketch that compiles in Arduino IDE. using platform IO it is failing to build. I have had it work a couple of times but cannot figure out how I am getting it to work only one time. currently I am being left with three "problems. all are with the AT24Cxx library.
ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second: this, of course, prevents me from uploading. when I have had a successful build I have saved it as a new file name and a second build results in the same errors in the terminal.

Are these only in the “Problems” view in VSCode or do they actually appear as compiler errors when you hit build? What are the error messages exactly?

those were the messages in the problems view. The terminal shows: .pio\build\megaatmega2560\src\3_12_23.cpp.o (symbol from plugin):(.text+0x0): first defined here
.pio\build\megaatmega2560\src\main.cpp.o (symbol from plugin): In function setup': (.text+0x0): multiple definition of loop’
.pio\build\megaatmega2560\src\3_12_23.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\megaatmega2560\firmware.elf] Error 1

So why do both src\3_12_23.cpp and src\main.cpp want to define the setup() and loop() function of the firmware? Is one of those files supposed to be in the project at all?

thanks. that last question pointed me in the right direction. the main.cpp file was there from thee framework creating it when I created a new project. The main.cpp file is not necessary and once I removed it building and uploading works now.