Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C++ Libraries / August 2006

Tip: Looking for answers? Try searching our database.

LNK2019 static link

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike C# - 16 Aug 2006 22:17 GMT
Hi all,

I'm trying to static link a .LIB file (the ZLib zlibstat.lib file to be
exact) to a VC++ app.  I have the correct LIB file and I've added the header
file and #pragma comment(lib, "zlibstat.lib") line to my code.  But I keep
getting errors like this:

imp_title error LNK2019: unresolved external symbol _inflateEnd referenced
in function "private: int __thiscall CZipFile::inf(struct _iobuf *,struct
_iobuf *)" (?inf@CZipFile@@AAEHPAU_iobuf@@0@Z)
imp_title error LNK2019: unresolved external symbol _inflate referenced in
function "private: int __thiscall CZipFile::inf(struct _iobuf *,struct
_iobuf *)" (?inf@CZipFile@@AAEHPAU_iobuf@@0@Z)
imp_title error LNK2019: unresolved external symbol _inflateInit_ referenced
in function "private: int __thiscall CZipFile::inf(struct _iobuf *,struct
_iobuf *)" (?inf@CZipFile@@AAEHPAU_iobuf@@0@Z)

Anyone have any ideas what could be causing this?  Thanks!
SvenC - 17 Aug 2006 08:28 GMT
Hi Mike,

> Hi all,
>
> I'm trying to static link a .LIB file (the ZLib zlibstat.lib file to be
> exact) to a VC++ app.  I have the correct LIB file and I've added the
> header file and #pragma comment(lib, "zlibstat.lib") line to my code.  But
> I keep getting errors like this:

Is the path of zlibstat.lib in your LIB path? Maybe it is not found by the
linker

Bye,
SvenC

> imp_title error LNK2019: unresolved external symbol _inflateEnd referenced
> in function "private: int __thiscall CZipFile::inf(struct _iobuf *,struct
[quoted text clipped - 7 lines]
>
> Anyone have any ideas what could be causing this?  Thanks!
Mike C# - 17 Aug 2006 21:30 GMT
Hi SvenC,

Yes I moved it to the same directory with the project source files.  I also
tried moving it to a sub-directory under the project and using #pragma
comment(lib, "subdirectory\\zlibstat.lib").  There's something funky going
on here, but I can't put my finger on it.  I'm thinking it might have
something to do with the fact that the zlibstat.lib source is C and maybe
the wrong calling conventions (__stdcall, __cdecl, etc.) are being used...
I've tried different calling conventions, but no luck so far...

It's a little aggravating and I might just keep searching for a different
zip library.  Know of any good, free, zip file extraction libraries
(unmanaged)?

Thanks

> Hi Mike,
>
[quoted text clipped - 22 lines]
>>
>> Anyone have any ideas what could be causing this?  Thanks!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.