Sophie

Sophie

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

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 
../INSTALLWINDOWS_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/compil1toolwindows_en.txt.


If you want to create your own program using Visual C++ 6, follow 
those steps :

 - open Microsoft Visual C++ 6

 - Menu File - New
   + select "Win32 Console Application"
   + project name "lcrzotest"
   + location "c:\lcrzo\lcrzotest"
   + button OK
   + create "an empty project"
   + button Finish

 - Menu File - New
   + select "C/C++ source file"
   + file name "t1.c"
   + enter in this file :
       #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);
       }

 - Menu Project - Settings
   + select "C/C++"
   + select the category "preprocessor"
   + additional include directories "c:\lcrzo\include\"
   + button OK

 - Menu Project - Settings [this step is very important]
   + select "C/C++"
   + select the category "code generation"
   + use run-time library "Multithreaded DLL"
   + button OK

 - Menu Project - Settings
   + select "Link"
   + select the category "general"
   + in "Object/library modules", add at the end "lcrzo.lib"
   + button OK

 - Menu Project - Settings
   + select "Link"
   + select the category "input"
   + additional libraries path "c:\lcrzo\lib\"
   + button OK

 - press F7

 - open a msdos console in "c:\lcrzo\lcrzotest\Debug" :
   + button Start - Menu Run - "command" (or "cmd")
   + cd c:\lcrzo\lcrzotest\Debug

 - run lcrzotest.exe :
   + lcrzotest
   The text displayed should be :
     The address is 1.2.3.4