Reputation: 2736
I've recently written a C program which uses the public-domain mpir and mpfr libraries. I've been compiling it on Windows, using the Microsoft Visual C++ 10.0 compiler. To get that to work, I had to do the following:
mpir.h
and mpfr.h
into the Include directory for the Microsoft compilermpir.lib
, mpir.pdb
, mpfr.lib
and mpfr.pdb
into the lib directory for the Microsoft compiler#include
mpir.h
and mpfr.h
in the programcl <..module names..> /link mpir.lib mpfr.lib
I now want to send the source / header files I've written to someone else, along with a makefile that they can use to compile the code and check that it works. Since that person won't have the mpir / mpfr libraries installed, and might not be using the same compiler, I'm not quite sure how to do this.
Here is what I can do:
mpir.lib
, mpir.pdb
, mpfr.lib
and mpfr.pdb
as well as the source / header files.Here is what I can't do:
Include
and lib
directories (unless there's no other way)Ideally, I should be able to send them the source/header files, together with the pertinent mpir/mpfr binaries, and a makefile which they can then run to build the program.
Thanks in advance for your help!
Upvotes: 1
Views: 399
Reputation: 109089
Why on earth are you adding those files to your compiler installation path?? The compiler has command line options for specifying search paths.
For instance,
cl /I"path/to/mpfr/header" <...filenames...> /link /LIBPATH:"path/to/mpfr/lib" mpir.lib mpfr.lib
You should only have to send your source code, mpir.h, mpir.lib, mpfr.h and mpfr.lib. The PDB files contain debugging information, and are not necessary for compilation.
Also, I don't know how to create a makefile, but a simple batch file with the command above should suffice for something so simple.
Upvotes: 1