Suppose I have a main macro named “macro.cpp” and two headers “h1.cpp” (contains the definition of a function) and “h1.h” containing the declaration of the function defined in “h1.cpp” similarly I have “h2.cpp” and “h2.h”. The main program “macro.cpp” calls those functions inside “h1” and “h2”. I was successful compiling the source files using:
.L h1.cpp+ .L h2.cpp+ .L macro.cpp+
which generated three .so files “macr_cpp.so, h1_cpp.so and h2_cpp.so”. I want to know what to do with them ? How do I link them so that I have something like a “macro.out” or something like that (a single executable file) which I can execute (I don’t know how !) and do whatever I wished to do with the macro.
Note: If I just load all the files using .L file_name.cpp etc and just execute the main macro using .x macro.cpp then everything works fine and I have results, but this is not what I want ! I want to compile like we do in usual g++ and by the way in every forum everyone keep advising on compiling using .L file_name.cpp+ or ++ … I would really like to know the whole story… because nobody seems to explain beyond .L file_name.cpp+ … what next ? What to do with the .so etc.
Thanks a lot