On Mon, Jun 22, 2009 at 10:40 AM, Thomas Hruska <[email protected]> wrote:
>
>
> hari_poddar2009 wrote:
> > --- In [email protected], Thomas Hruska <thru...@...> wrote:
> >> hari_poddar2009 wrote:
> >>> i need to write a program that checks for the existence of a file in the 
> >>> application data folder referred by the environment variable %APPDATA%. 
> >>> If it does not exist the file will be created, written to, compressed and 
> >>> closed. if it exists then the file will be opened using LZOPenFile(). The 
> >>> end of file will be sought and the file will be written to. Then the file 
> >>> will be closed with LZClose(). My code is listed below:
> >>>
> >> <snip>
> >>> i am using the lcc win32 compiler and am getting the error message:
> >>> "undefined reference to _lzopenf...@12" in the line which calls
> >>> INT result=LZOpenFile(name2ptr,openPtr,OF_READWRITE);
> >>> please help!
> >> This is a linker issue. You probably need to add 'lz32.lib' to the
> >> linker dependency/library options.
> >>
> >
> > i created a new project and added the source file with my code to it.
> > i also mentioned 'lz32.lib' in the linker settings dialog box. i rebuilt 
> > the make file as prompted and then compiled the project. i still got the 
> > same error i mentioned in my previous post!
>
> You mentioned that you are using lcc win32, which I'm not familiar with.
> This is a linker error you will have to figure out. Alternatively,
> you could try using LoadLibrary()/GetProcAddress().
>



This is certainly a linker error. You have added the lib file name in
the linker settings but you may not specified the correct path.

First check out, where this file 'lz32.lib' resides in your system.
Change your lib file path accordingly. As an alternative you can copy
'lz32.lib' to the folder where other library files reside.

-Sanjeev

Reply via email to