LDLIB VER

From VrlWiki
Revision as of 16:44, 19 November 2010 by Brad Berg (talk | contribs) (New page: LDLIB_VER = <Library Name> ... Programs that link libraries need to build everything with the same compiler. Libraries are generally built with all available compilers. The '''L...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
LDLIB_VER = <Library Name>  ...

Programs that link libraries need to build everything with the same compiler. Libraries are generally built with all available compilers. The LDLIB_VER variable links the library corresponding to the compiler used to build the program.


A setting of <Library> will link the library named:

$G/install_WIN32/lib/<Library>/<Library>-$G_COMPILER[_g|_p].lib
$G/install_linux/lib/<Library>/lib<Library>-$G_COMPILER[_g|_p].a


The _g suffix is on the debug version and the _p suffix is the profiling version. The program will also compile using the headers:

$G/install_linux/include/<Library>/*.h


For example building a library named draw on Linux would create:

$GTO/install_linux/lib/draw/libdraw-gcc2.a
$GTO/install_linux/lib/draw/libdraw-gcc2_g.a
$GTO/install_linux/lib/draw/libdraw-gcc2_p.a
$GTO/install_linux/lib/draw/libdraw-gcc3.a
$GTO/install_linux/lib/draw/libdraw-gcc3_g.a
$GTO/install_linux/lib/draw/libdraw-gcc3_p.a
$GTO/install_linux/lib/draw/libdraw-gcc4.a
$GTO/install_linux/lib/draw/libdraw-gcc4_g.a
$GTO/install_linux/lib/draw/libdraw-gcc4_p.a


If LDLIB_VER was set to draw, a debug version of a program compiled with gcc4 would link with:

$G/install_linux/lib/draw/libdraw-gcc4_g.a


To access the headers from the source code you would code:

#include  <draw/drawStuff.h>


The header file accessed would be installed in:

$G/install_linux/include/draw/drawStuff.h