cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: compiling ftpget.c

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Sun, 30 May 2004 08:38:14 -0700

On Sun, May 30, 2004 at 07:52:46AM -0400, behrouz BC zolfaghari wrote:
>
> Hi
> I have downloaded the example program "ftpget.c"
>
> I acompiled it as follows (under redhat linux)
>
> gcc -c -o ftpget ftpget.c
>
> but when I run it i get the following error
> permission denied
>
> and after I run the following command
>
> chmod +x ftpget
>
> agin I recieve the following error when running the program
>
> cannot execute binary file
>
>
> Is there anyone who can help me?

Yes.

> Thanks in advance

You didn't link your program; you're trying to execute an unexecutable
object file. Try this to compile and link your program:

        gcc -o ftpget ftpget.c -lcurl

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2004-05-30