Remarkably, only 1 week before you posted the question this feature was added to compiler explorer. As of Nov 2021 it is reported to still have some rough edges, and not every combination of controls work - but starting from the simple template Matt delivered and following his instructions work for me:
go to compiler explorer
click "Add..." at the very top left and choose "Tree (IDE mode)".
Move the files you have open into "Included files" with the plus (you will have to give them names)
(For C++) tick "CMake" and then create a CMakeLists.txt with appropriate info it in
Ensure it says -DCMAKE_BUILD_TYPE=Debug in the box under
In the box under that choose the name of your target, e.g. "test"
You can then "Add new..." and make a compiler that will run CMake
Note this does not include uploading the headers, but rather pasting them in new CE editors. Also, judging by your screenshot - when you write 'other lib files' I assume you mean other headers. Lib files aren't supported.
If your project was a CMake one, you might have been able to upload it directly (someone did).