Board index » kylix » [REPOST] Kylix Delphi using obj files...

[REPOST] Kylix Delphi using obj files...


2005-07-19 04:51:17 PM
kylix2
Hi,
I have reposted this here after being told to do so :)
I'm muddling about with BZip2 compression in both Linux and Windows...
I found a beatifull zip file containing a number of .obj files that can be
compiled in using Delphi
And indeed this works great. The obj files are created using the borland c
compiler like
bcc32 -c -DBZ_NO_STDIO bzlib.c (etc...)
Also tried this myself, and the .obj files are properly recreated under
windows, and work fine using
{SL blocksort.obj} (etc...)
Now I need that same library to be compiled into a Kylix app, and found out
that the .obj files cannot be used.
I also tried to recompile them using Kylix C witout any luck...
I tried the following:
bc++ -c -DBZ_NO_STDIO bzlib.c <= Lotsa errors on /usr/include/stdlib.h
Has anyone tried this before?
How can I recreate these object files for use within Kylix?
Now I get the error:
Bad object file format: 'blocksort.obj'
Unsatisfied forward or external declaration: '_blocksort'
So it's obvious that the windows binaries are unusable under Linux (duh)...
Thanks in advance for any info,
Rory Vieira
 
 

Re:[REPOST] Kylix Delphi using obj files...

Hi
Did you try what I answered you to the original post?
A: Link to the libbz2.so which is installed on most Linux Systems, so
there is no need to compile it into your app.
or
B: Compile the sources with gcc to create the .o files?
www.bzip.org/downloads.html
or
C: Use the command-line interface (bzip2 / bunzip2)
You'll find some header-translation here:
www.delphi-jedi.org/JEDIXLIBRARY:577599
 

Re:[REPOST] Kylix Delphi using obj files...

Dear Theo,
Quote
A: Link to the libbz2.so which is installed on most Linux Systems, so
there is no need to compile it into your app.
Tried this, got loadsa errors after trying to interface with it. Had similar
problem using audiere library too... Fixed the audiere thing by adding a few
parameters to gcc. However this didn't work for the BZip2 lib.
Just found the original news post:
sourceforge.net/mailarchive/forum.php
Quote
B: Compile the sources with gcc to create the .o files?
www.bzip.org/downloads.html
Ah, same as above. I'm not allowed to simply 'add' these object files in
Kylix. In Delphi they were created using C++ builder, which is able to
create the proper object files somehow... still investigating if I can
repeat that...
The trouble I have with A and B is that my C knowledge is lousy. I have no
idea what to do, in order to make any of it work. My work on the audiere lib
was just a fluke which I stumbled upon searchin on Google.
Quote
C: Use the command-line interface (bzip2 / bunzip2)
Not an option. I'm using CompressStream/DecompressStream functions I wrote
for the library to begin with. Actually, my app is a port of an original
Delphi app. But I would like to try and make a nice X binary...
I hope this is enough info ;)
Cheers (and thanks for any help),
Rory
 

{smallsort}