News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

how to link to c codes (gzip source code)

Started by gurangax, January 25, 2008, 07:29:08 AM

Previous topic - Next topic

gurangax

I am writing a program which must use gzip compression and decompression. The problem is I am too lazy to convert the gzip c source codes into hla codes. What I did is just call the gzip.exe program using w.ShellExecute.

Is there anyway I can link my program to the gzip c source code or the *.obj so that I may run gzip directly in my program without using w.ShellExecute? Or maybe some of you guys have the gzip source code in hla are kind enough to share it with me?

The c compiler I used is GNU GCC compiler with code block IDE.



Sevag.K

Quote from: gurangax on January 25, 2008, 07:29:08 AM
I am writing a program which must use gzip compression and decompression. The problem is I am too lazy to convert the gzip c source codes into hla codes. What I did is just call the gzip.exe program using w.ShellExecute.

Is there anyway I can link my program to the gzip c source code or the *.obj so that I may run gzip directly in my program without using w.ShellExecute? Or maybe some of you guys have the gzip source code in hla are kind enough to share it with me?

The c compiler I used is GNU GCC compiler with code block IDE.



Since you're using w.ShellExecute, you want gzip on Windows.  This may cause a problem.  In my experience, all the gxxx stuff has a different object format than the Windows version so you won't be able to do a straight liking.  If you do in fact have COFF object files for gzip, all you need to use the functions is to write a header file or wrapper functions (if gzip is object oriented code).

If gzip is an ELF object, you'll have more difficulties.  Perhaps there is a object file format conversion program that will help you.

gurangax

thanks a lot. I need some more learning  :thumbu


gurangax


Evenbit