Dear All:
I have question about how to compile those below code.
The architecture is as below:
Independent:
caluating.cc , reading.cc, ran_gen.cc, hamming.cc, sorting.cc,
combine.cc
-----------
Dependency:
find_column.cc self + hamming.cc, sorting.cc
counting.cc self + hamming.cc, count.cc
write.cc self, hamming.cc
rem_routine.cc self, hamming.cc, combine.cc
solving.cc self, counting.cc+find_column.cc+ran_gen.cc+sorting.cc
main.cc self+reading.cc+ran_gen.cc+write.cc+rem_routine.cc +
solving.cc
I write the main function in main.cc , other programs are describle
some other function.
---------------
I try to compile hamming.cc and write.cc to create hamming.o and
write.o
g++ -c hamming.cc ; this pass, no error.
However, when I compile write.cc , there are some error; I try three
method, but all fail.
1.g++ -c write.cc hamming.o
error message:
g++: hamming.o: linker input file unused because linking not done
2.g++ write.cpp hamming.o -o write
: undefined reference to `main'
3.g++ -c write.cpp hamming.o -o write
g++: cannot specify -o with -c or -S and multiple compilations
I don't know how to compile those code to a executable file.
Thank you for helping.
Sen-Lung