gcc -c -o app main.o build/service.o -std=c++11 -lstdc++ -lboost_system -lboost_thread -lpthread simulation_tool.a
gcc: warning: main.o: linker input file unused because linking not done
gcc: warning: build/service.o: linker input file unused because linking not done
gcc: warning: simulation_tool.a: linker input file unused because linking not done
gcc -o app main.o build/service.o -std=c++11 -lstdc++ -lboost_system -lboost_thread -lpthread simulation_tool.a
build/service.o: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status
When I am giving -c option I am getting linking warnings as -c will not able to link, but without -c option I am not able to generate binary output whats wrong with compilation option?
I am trying to link .a file and with object file and generating binary as output in above compilation