Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > media > contrib > by-pkgid > 10b30098cf3ad5da9b56d5eb4c8ec6ae > files > 4

liblcrzo0-static-devel-4.16.0-2mdk.ppc.rpm


This file explains how to compile a program with lcrzo.

If you want to compile lcrzo, you're not reading the good file. Read 
../INSTALLUNIX_EN.TXT.

If you want to compile separately one tool of lcrzoex, it's more
complicated than what's explained here : read 
lcrzoex-4.xx-src/doc/compil1toolunix_en.txt.


To compile a program with lcrzo :

 - add "#include <lcrzo.h>" at the top of your C file
   Here is an example :
       #include <lcrzo.h>
       #include <stdio.h>
       int main(void)
       { lcrzo_ipl ipl;
         lcrzo_init();
         lcrzo_epr(lcrzo_ipl_init_ips("1.2.3.4", &ipl));
         lcrzo_epr(lcrzo_ipl_print("The address is ", ipl, "\n"));
         lcrzo_close();
         return(0);
       }

 - compile with :
     gcc -o file file.c -llcrzo -lpcap
   or with (preferred solution) :
     gcc -o file file.c `lcrzo-config --cflags --libs`
     gcc -o file file.c `lcrzo-config -cl`

 - run it with :
     ./file