"Helen" <> wrote in message
>
> I have already got one C file for matrix inversion,
> so I hope I can build this matrix inversion function into
> some library, so that I can call it from another C file.
> What should I do?
> Where can I find detailed information about that?
> Thanks a lot!
>
There's not really much advantage in having a formal library unless you have
a lot of code in there and want to use it for several projects.
The simplest solution is just to add the source file with the matrix
inversion code to the current build. Then you don't lose the source, it is
easy to inspect it and modify it in case of bugs.
However if you really want a library, you have to invoke the C compiler in
"build library" mode. It will then output a library file, which the linker
will be able to link.
Unfortuately the specifics of how to do this vary from compiler to compiler.
In MSVC++ you declare your project as a "static library", and it handles all
the rest for you.
|