2 <opt name="PageTitle" value="Compiling dxflib" />
3 <section>Compiling dxflib</section>
8 <subsection>Unix / Linux</subsection>
11 <para>Under Unix and Linux Systems, compiling dxflib is a simple standard
14 <includecode src="code/compile_unix.sh" />
16 <para>This creates the file './lib/dxflib.a' . To compile a dynamic version
17 of dxflib, run 'make shared' instead of 'make' . This will create the file
18 './lib/libdxf.so.2.0.x.x' and the link './lib/libdxf.so' that points to
19 './lib/libdxf.so.2.0.x.x' .</para>
21 <para>Instead of running 'make install', you can also copy the header files
22 into a header directory of your choice and copy the library files into a
23 library directory of your choice.</para>
26 <subsection>Windows</subsection>
29 <para>There are many different ways to compile dxflib under Windows. You can
30 use Microsoft's Visual C++ compiler, Borland's C++ command line tools, gcc
31 and many other compilers.
34 For this manual, only the process of compiling dxflib using cygwin
35 <a href="appendix_bib.html#cygwin">[CYGWIN]</a> and the gcc compiler
36 from the MinGW32 package is shown:
38 Borland C++ command line tools <a href="appendix_bib.html#bcc">[BCC]</a>.
42 <includecode src="code/compile_win.sh" />
47 <li>Launch a cygwin console</li>
48 <li>Set the environment variable BCB to point to your installation
49 directory of the Borland C++ compiler (Windows style). E.g.:<br/>
50 <code>export BCB=c:\\Borland\\BCC55</code></li>
51 <li>Check if bcc32 can be found:<br/>
52 <code>bcc32</code><br/>
53 If that is not the case, please add the path where
54 the bcc32.exe binary is located to your PATH variable (Unix style):<br/>
55 <code>export PATH=/cygdrive/c/Borland/BCC55/Bin:$PATH</code></li>
56 <li>Because Windows doesn't support links, you need to copy the header
57 files to the include directories:<br/>
60 cp `find . -name "*.h"` ../include/
62 <li>Compile the library using the makefile that comes with the
64 <code>cd dxflib/src<br/>
65 /cygdrive/c/Borland/BCC55/Bin/make.exe -f makefile_win_bcc55
68 <li>Check if the file dxflib.lib was created in ./lib:<br/>
69 <code>ls -la ./lib</code></li>