curl-library
Re: ftpupload.c example
Date: Mon, 18 Feb 2008 17:57:31 -0800 (PST)
Tnx for the wuick response, after doing so, I get a warning messages...
--------------------Configuration: ftpupload - Win32 Debug--------------------
Compiling...
ftpupload.c
E:\curlcpp\libcurl-msvc\docs\examples\ftpupload.c(46) : warning C4013: '_open' undefined; assuming extern returning int
E:\curlcpp\libcurl-msvc\docs\examples\ftpupload.c(48) : warning C4013: '_close' undefined; assuming extern returning int
ftpupload.obj - 0 error(s), 2 warning(s)
And when I run the program, it crashes giving me a pop up saying "ftpupload.exe has encountered a problem and needs to close. We are sorry for the inconvenience." BTW here's the code of line (46) and (48)
/* get the file size of the local file */
hd = open(LOCAL_FILE, O_RDONLY) ;
fstat(hd, &file_info);
close(hd) ;
regie
Jeff Pohlmeyer <yetanothergeek_at_gmail.com> wrote: On Feb 18, 2008 4:51 AM, Static Pulse wrote:
> When I tried comenting out #include it gives me back an error:
> E:\curlcpp\libcurl-msvc\docs\examples\ftpupload.c(44) : warning C4013:
> 'open' undefined; assuming extern returning int
> E:\curlcpp\libcurl-msvc\docs\examples\ftpupload.c(46) : warning C4013:
> 'close' undefined; assuming extern returning int
I'm not on Windows right now, but maybe if you
add these two lines it will work:
#define open _open
#define close _close
- Jeff
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
Received on 2008-02-19