X-Spam-Check-By: sourceware.org Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Subject: RE: How Can I Use the FtpCommand Function with Cygwin? Date: Tue, 14 Feb 2006 09:35:05 -0800 Message-ID: From: "Tischler, Ron" To: X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id k1EHa2F2024225 Thanks for your reply, but the makefiles that I'm using do use .lib files, and things are following PC rather than unix conventions, and I am already getting wininet.lib, because other stuff that is working comes from there. So, I believe the answer is that wininet.lib is just out of date on my PC, because FtpCommand is relatively new. There are two approaches that I'm going to try, although I haven't tried either yet. One is that I found the same exact question on the web, which you can also find by searching for "wininet.lib" and "FtpCommand unresolved symbol", and the answer gave instructions for downloading a newer version of the "platform SDK". This person said that his version had been from 2003, which wasn't new enough. (Mine is from 1998.) So, I may try that, although other people who use the same makefiles will then all have to update their PC's the same way. The other possibility is that I'm going to try looking at the source code for ftp on Cygwin. I think the same functionality that I'm trying to implement with FtpCommand had to work in Cygwin's ftp before FtpCommand was available, so maybe it will show another way of doing it. -----Original Message----- From: cygwin-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com] On Behalf Of Brian Dessent Sent: Monday, February 13, 2006 8:01 PM To: cygwin AT cygwin DOT com Subject: Re: How Can I Use the FtpCommand Function with Cygwin? "Tischler, Ron" wrote: > I am trying to use Cygwin to write a PC application that calls the > function named FtpCommand. Microsoft documentation that I found > online says that there is a header named wininet.h and a library named > wininet.lib to link in. On my PC, under the Cygwin stuff, I see > wininet.h, but not wininet.lib. This version of wininet.h does have a > declaration of FtpCommand. > > My PC also has copies of wininet.h and wininet.lib under "Program > Files", but this copy of wininet.h and wininet.lib does not contain > FtpCommand. When I compile, this header gets brought in, not the > Cygwin one, so my use of FtpCommand doesn't compile cleanly. I can > get around that by typing in the declaration of FtpCommand myself. > But then, of course, I get link time errors because it didn't find a > wininet.lib that contained FtpCommand. > > Should I be trying to get a copy of wininet.lib from Cygwin, or a more > up-to-date version of wininet.lib from Microsoft? Either way, what > would I need to do to link it into my application? You don't have to worry about any of that stuff. Just make sure you have the w32api package installed, then #include the header as usual and add -lwininet to the end of your link command line. Don't try to mix in any other source of headers or libraries, especially the pSDK. w32api has everything. Cygwin does not use .lib files, and the naming of libraries is that of unix. So you use -lfoo to link with libfoo.a (or sometimes libfoo.dll.a) which is the import library for the DLL. Brian -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/