This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

how to compile C&C++files?

situation is:

* I have a library file implemented by C++, also include the header file(*.h); 

* I have another project implemented by C, and this project need the C++ library(mentioned above); 

the question is, how could I compile and link all the files into a .out with C6000 Compiler cgt6x? which compiler and linker options should i select?

with the docs, I think the steps below will work, but i am not very sure of it. could anyone correct me if had any error?

* cl6x *.c *.o    // compile all C files into object file seperately;

* cl6x --cpp_file=*.cpp *.o // compile all the related C++ files into obj file seperatly;

* cl6x --run_linker [link_options] *.o *.out // link all obj files into a .out file