curl-library
Re: ftpupload.c example
Date: Tue, 19 Feb 2008 16:44:24 +0100
Hi Regie,
please dont top-post (means start with your reply after quote).
> After doing so, My program crashes it says"ftpupload.exe has encountered a
> problem and needs to close. We are sorry for the inconvenience" and I get
> this warning messages:
> --------------------Configuration: ftpupload - Win32
> Debug--------------------
> Compiling...
> ftpupload.c
> E:\curlcpp\libcurl-msvc\docs\examples\ftpupload.c(32) : warning C4005:
> 'LOCAL_FILE' : macro redefinition
> e:\curlcpp\libcurl-msvc\docs\examples\ftpupload.c(0) : see
> previous definition of 'LOCAL_FILE'
> Linking...
> ftpupload.exe - 0 error(s), 1 warning(s)
> And here's my line (32) code :
hmm, strange - since I guess you have no line 0 this comes probably from a commandline define? I dont know.
Anyway the linker error and the missing prototype warnings are gone;
I've just tried with MSVC6, and the redefines seem not needed;
just try again, but this time with only:
#ifdef WIN32
#include <io.h>
#else
#include <unistd.h>
#endif
BTW. you really dont need a project file at all; I did compile from commandline with:
C:\projects\curl-7.18.0\docs\examples>vcvars32
C:\projects\curl-7.18.0\docs\examples>cl -I../../include ftpupload.c /link /libpath:../../lib libcurl_imp.lib
Microsoft (R) 32-bit C/C++ Standard Compiler Version 12.00.8168 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
ftpupload.c
Microsoft (R) Incremental Linker Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
/out:ftpupload.exe
/libpath:../../lib
libcurl_imp.lib
ftpupload.obj
Guenter.
Received on 2008-02-19