Pioenvs/feather32u4/firmware.elf Error when using multiple files

I run my code within a single file and everything worked. But when I started using header files so the code looks a bit more clean I can’t build it. It says:

collect2: error: ld returned 1 exit status
*** [.pioenvs/feather32u4/firmware.elf] Error 1

But no syntax problems etc. are showing showing up. What could be the problem?

That’s a generic “linker failed” error, we can’t tell what’s wrong if you don’t post the full output.

Can you upload the full error message and your file structure & code?