Regarding issue with compilation of multiple source files


I am compiling multiple source files and trying to generate one executable out of it and getting following error:

“cannot specify -o when generating multiple output files”

The command is like following:

$ clang++ exec_1.bin 1.cpp 2.cpp. 3.cpp

Please let me know how to solve this issue.


Sameer Joshi

can you show the actual command & it’s exact output? I’m guessing you’ve got a -c (or -S, etc) in there somewhere, perhaps?