![]() Building the LibraryBelow is a rough outline for building C Numerics Library so you can use it in your projects. |
Prior to building the library, you will need to install it. This is done simply by unarchiving the ZIP file containing the library's source code and utility files. After you have extracted the files you should have a directory structure that looks like the following:
HOME | + bin | + docs | + include | + lib | + make | + src | + test | + tmp | + dll | + testHOME refers to the root directory you chose to extract the library to.
To build the library, you will need a C compiler. The compiler you use must have support for the Standard C Library, which most current compilers do.
After you have a compiler, you will need to compile the source code of the library. This process is very dependent on the compiler you have and whether or not you use an Integrated Development Environment (IDE). The library is probably most useful if it is compiled into a static or shared library. Please consult the documentation that comes with your compiler and/or IDE for further instructions on how to build such libraries.
A couple of things to be aware of when building the library are to add the HOME/include path to your compiler's include directive. Also, if you want to build the library as a shared library, you will need to define the preprocessor directive NUMERICS_SHARED_LIB prior to compiling.
Currently, shared library compilation is supported for Microsoft Visual C++ 5.0 (MSVC) or greater. If you use a different compiler and you want to build a shared library, you will need to modifiy HOME/include/numerics.h to add support for your compiler. If you successfully build a shared library for a compiler other than MSVC, inform me of the modifications neccessary to the source files and I will add those changes to subsequent releases of C Numerics Library.
With this release of C Numerics Library, a MSVC makefile has been included. If you use MSVC, you can quickly build C Numerics Library as both a Windows static library and Windows shared library (DLL) by using the NMAKE utility supplied with MSVC. The MSVC makefile can be located at HOME/make/msvc.mak.
Currently, building via a makefile is supported for MSVC. If you use a different compiler and successfully build C Numerics Library using your own makefile, feel free to send me a copy of the makefile and I will add it to subsequent releases of C Numerics Library.
If you have any problems that you can not solve, please contact me and I will try to resolve them.
Copyright © 2001 WordenWare. All rights reserved. |