I downloaded a free Delphi component for working with BZip2-archives: http://www.torry.net/vcl/compress/other/BZip21.05.zip (More experienced unit AbBzip2.pas component Abbrevia http://sourceforge.net/projects/tpabbrevia/files/) - they are very similar.
The components work well.
Problem:
I see that version *.obj files BZip2 libraries in components - are old - 1.0.5 of 10 December 2007. Decided to update the obj-files into new ones.
I going and download the latest version BZip2 - 1.0.6 - http://www.bzip.org/downloads.html
Unpack the source BZip2 archive into a folder c:\BZip2Src
Run "Open the command line VS2012 x86 Native Tools" (% comspec% / k "" C: \ Program Files (x86) \ Microsoft Visual Studio 11.0 \ VC \ vcvarsall.bat "" x86)
In console, I go to the c:\BZip2Src (Cd /d c:\BZip2Src)
Compile the project as described in the makefile.msc (#usage: nmake.exe -f makefile.msc) and get new *.obj files. Along the way, getting a working programm bzip2.exe.
Copy the new *.obj instead of the old blocksort.obj, huffman.., compress.., decompress.., bzlib.. in folder component for Delphi.
Run Delphi, trying to recompile components.
Get the error "[dcc32 Error] AbBzip2.pas (215): E2065 Unsatisfied forward or external declaration: 'BZ2_hbMakeCodeLengths'" and other similar ones.
or for bzip2.bas - [dcc32 Error] BZip2.pas(171): E2065 Unsatisfied forward or external declaration: '_BZ2_hbMakeCodeLengths'
...
{$L huffman.obj}
{$L compress.obj}
{$L decompress.obj}
{$L bzlib.obj}
{ $L crctable.obj}
{ $L randtable.obj}
{$IFDEF LFS}
uses
Windows;
{$ENDIF}
procedure _BZ2_hbMakeCodeLengths; external; // **ERROR LINE**
procedure _BZ2_blockSort; external; // if i replace on "BZ2_blockSort" (without "_"), i get error "[dcc32 Error] BZip2.pas(710): E2065 Unsatisfied forward or external declaration: 'bz_internal_error'"
procedure _BZ2_hbCreateDecodeTables; external;
...
I can not point out all of the options compiler without any modifications in C++ command line?
Did not work with C + +, help compile correctly *.obj files.