LNK2019: Not sure how to import the library that may resolve this error.

Christopher D. Young 1 Reputation point
2021-11-15T15:33:00.657+00:00

In trying to compile an old program, I have been running into LNK2019 errors related to the compiler trying to implement old compression algorithms (specifically Huffman compression, LZ compression and RLE compression). I am not sure if visual studio supports these methods, or the library related to them, as the code was last built on visual studio 2010. Is there any way to fix these errors without having to roll back to a previous version of visual studio.

Windows 10 Compatibility
Windows 10 Compatibility
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Compatibility: The extent to which hardware or software adheres to an accepted standard.
487 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Christopher D. Young 1 Reputation point
    2021-11-15T16:26:40.58+00:00

    These are the two types of errors in the program, there are others like this, but I decided to pick out two of them just to save space. The compilation process also is not finding/generating a dll, but I think that is related to whether the rest of the program works or not. @David Lowndes

    Severity Code Description Project File Line Suppression State
    Error LNK2028 unresolved token (0A0000EC) "extern "C" int __cdecl LZ_Compress(unsigned char *,unsigned char *,unsigned int)" (?LZ_Compress@@$$J0YAHPAE0I@Z) referenced in function "protected: static unsigned char * __cdecl COMPANYNAME_FileBuffer::CompressLZ_BCL(unsigned char const *,unsigned long,unsigned long &,class COMPANYNAME_ErrorList *)" (?CompressLZ_BCL@COMPANYNAME_FileBuffer@@$$FKAPAEPBEKAAKPAVCOMPANYNAME_ErrorList@@@Z) COMPANYNAME_DotNetBridgeLib C:\Users\My.Name\Documents\TelemetryRepo\Libs\Source\COMPANYNAME_DotNetBridgeLib\COMPANYNAME_FileBuffer.obj 1

    Severity Code Description Project File Line Suppression State
    Error LNK2019 unresolved external symbol "extern "C" void __cdecl Huffman_Uncompress(unsigned char *,unsigned char *,unsigned int,unsigned int)" (?Huffman_Uncompress@@$$J0YAXPAE0II@Z) referenced in function "protected: static unsigned char * __cdecl COMPANYNAME_FileBuffer::UncompressHUFFMAN_BCL(unsigned char const *,unsigned long,unsigned long,class COMPANYNAME_ErrorList *)" (?UncompressHUFFMAN_BCL@COMPANYNAME_FileBuffer@@$$FKAPAEPBEKKPAVCOMPANYNAME_ErrorList@@@Z) COMPANYNAME_DotNetBridgeLib C:\Users\My.Name\Documents\TelemetryRepo\Libs\Source\COMPANYNAME_DotNetBridgeLib\COMPANYNAME_FileBuffer.obj 1


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.