RE: How Can I Use the FtpCommand Function with Cygwin?

2006-02-15 Thread Dave Korn
On 15 February 2006 14:10, Eric Blake wrote:

> According to Tischler, Ron on 2/14/2006 10:35 AM:
>> Thanks for your reply, but the makefiles that I'm using do use .lib
>> files, and things are following PC rather than unix conventions, 

> conventions and not Windows functions.  If you want to use Windows
> conventions, then investigate mingw.


  Me and Ron resolved this off-list.  It turns out that they're using cygwin
for make/bash/sed/similar small utilities, but the actual compiler in question
is intel's icl, and as such any problem with the libraries is
not-a-cygwin-problem and in any case this implies that the final app is a pure
windows app and not a cygwin app in any case.

  So he could probably call _kbhit /as well/ as FtpCommand!


cheers,
  DaveK
-- 
Can't think of a witty .sigline today


--
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/



Re: How Can I Use the FtpCommand Function with Cygwin?

2006-02-15 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

According to Tischler, Ron on 2/14/2006 10:35 AM:
> 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.

Have you not read the recent thread on _kbhit?  Explicitly using a
Windows-provided function in cygwin is counterproductive, since the point
of cygwin is POSIX compliant and POSIX doesn't provide windows functions.
 The rest of this thread details tricks that may make it possible to use
FtpCommand, but if you are truly trying to write a portable app that also
works on unix, then when compiling for Cygwin you should use Unix
conventions and not Windows functions.  If you want to use Windows
conventions, then investigate mingw.

- --
Life is short - so eat dessert first!

Eric Blake [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.1 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFD8zYh84KuGfSFAYARAg5YAJ9BFfxWCS/wBzIcxMtG6xJeEz01nwCghWZ4
AnUubESwX+8SLMsYfaUsCDQ=
=1Cwl
-END PGP SIGNATURE-

--
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/



RE: How Can I Use the FtpCommand Function with Cygwin?

2006-02-14 Thread Gary R. Van Sickle
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Tischler, Ron
> Sent: Tuesday, February 14, 2006 12:44 PM
> To: cygwin@cygwin.com
> Subject: RE: How Can I Use the FtpCommand Function with Cygwin?
> 
> These makefiles are large, and they came to us from another 
> company, and there are good business reasons to avoid 
> changing them.  Saying that the makefiles are going about 
> everything the wrong way is not an option.  
> 

Sometimes failure is not an option; it comes standard.

-- 
Gary R. Van Sickle


--
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/



RE: How Can I Use the FtpCommand Function with Cygwin?

2006-02-14 Thread Dave Korn
On 14 February 2006 18:44, Tischler, Ron wrote:

  NUMBER ONE THING TO DO BEFORE YOU POST TO THIS LIST AGAIN:  READ 
http://cygwin.com/acronyms#PCYMTNQREAIYR.

> These makefiles are large, and they came to us from another company, and
> there are good business reasons to avoid changing them.  Saying that the
> makefiles are going about everything the wrong way is not an option.




  It's not the makefiles "going about everything the wrong way", it's YOU.

  Yes, the makefiles are good.  They take a bunch of source, and build it with
MSVC, and link it against the MSVC import libs, and all is good.

  Now you've taken the makefiles, kept them the same, taken the sources, kept
them the same, but you've changed the compiler to gcc.  WHY do you refuse to
use the new import libs that go with the new compiler you've changed to using?


cheers,
  DaveK
-- 
Can't think of a witty .sigline today


--
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/



RE: How Can I Use the FtpCommand Function with Cygwin?

2006-02-14 Thread Tischler, Ron
These makefiles are large, and they came to us from another company, and
there are good business reasons to avoid changing them.  Saying that the
makefiles are going about everything the wrong way is not an option.  


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Christopher Faylor
Sent: Tuesday, February 14, 2006 10:14 AM
To: cygwin@cygwin.com
Subject: Re: How Can I Use the FtpCommand Function with Cygwin?


On Tue, Feb 14, 2006 at 06:07:11PM -, Dave Korn wrote:
>On 14 February 2006 17:35, Tischler, Ron wrote:
>>From: cygwin-owner On Behalf Of Brian Dessent
>>Sent: Monday, February 13, 2006 8:01 PM
>
>>"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.
>
>>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.
>
>>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.
>
>"My makefiles are using the wrong input files"
>
>"Well, get them to use the correct input files"
>
>"But I don't want to change them.  Tell me how to use the wrong files 
>instead."

Actually, it's "But I don't want to change them because that's too
complicated.  Please engage me in a days-long back and forth email
discussion so that I can avoid this complication and painstakingly
figure out how to avoid changing my makefiles."

>

Indeed.

cgf

--
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/



Re: How Can I Use the FtpCommand Function with Cygwin?

2006-02-14 Thread Christopher Faylor
On Tue, Feb 14, 2006 at 06:07:11PM -, Dave Korn wrote:
>On 14 February 2006 17:35, Tischler, Ron wrote:
>>From: cygwin-owner On Behalf Of Brian Dessent
>>Sent: Monday, February 13, 2006 8:01 PM
>
>>"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.
>
>>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.
>
>>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.
>
>"My makefiles are using the wrong input files"
>
>"Well, get them to use the correct input files"
>
>"But I don't want to change them.  Tell me how to use the wrong files
>instead."

Actually, it's "But I don't want to change them because that's too
complicated.  Please engage me in a days-long back and forth email
discussion so that I can avoid this complication and painstakingly
figure out how to avoid changing my makefiles."

>

Indeed.

cgf

--
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/



RE: How Can I Use the FtpCommand Function with Cygwin?

2006-02-14 Thread Dave Korn
On 14 February 2006 17:35, Tischler, Ron wrote:

> -Original Message-
> From: cygwin-owner On Behalf Of Brian Dessent
> Sent: Monday, February 13, 2006 8:01 PM

> "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.

> 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.

> 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.  



"My makefiles are using the wrong input files"

"Well, get them to use the correct input files"

"But I don't want to change them.  Tell me how to use the wrong files
instead."






cheers,
  DaveK
-- 
Can't think of a witty .sigline today


--
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/



Re: How Can I Use the FtpCommand Function with Cygwin?

2006-02-14 Thread Brian Dessent
"Tischler, Ron" wrote:

> 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.

I don't understand why you're trying to fit the square peg in the round
hole then.  If you're using Cygwin, the proper way to link against
wininet is to add "-lwininet" to the link command line.  That's it, you
don't have to mess around with any of this "find the right .lib file"
business.

> 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.

w32api's libwininet.a contains definitions for FtpCommand and all the
other ftp functions.  As I said earlier, trying to grab stuff from the
platform SDK is going to make all kinds of things break.  w32api has
everything you need.

> 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.

That will not get you anywhere, as the ftp command implements the ftp
protocol itself, it does not use the wininet library.

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/



RE: How Can I Use the FtpCommand Function with Cygwin?

2006-02-14 Thread Tischler, Ron
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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Brian Dessent
Sent: Monday, February 13, 2006 8:01 PM
To: cygwin@cygwin.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/



Re: How Can I Use the FtpCommand Function with Cygwin?

2006-02-13 Thread Brian Dessent
skaller wrote:

> > -lopengl32 ?
>
> Does that work? Won't it look for libopengl32.dll?

When you specify -lfoo there are a number of forms of foo that are
searched.  See the 'ld' manual for details.  But w32api includes the
import library libopengl32.a which is what will be found on a stock
system.

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/



Re: How Can I Use the FtpCommand Function with Cygwin?

2006-02-13 Thread skaller
On Mon, 2006-02-13 at 20:18 -0800, Brian Dessent wrote:
> skaller wrote:
> 
> > > 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.
> > 
> > Can you tell me how you link to OpenGL32.dll?
> 
> -lopengl32 ?
> 
> Brian

Does that work? Won't it look for libopengl32.dll?

-- 
John Skaller 
Felix, successor to C++: http://felix.sf.net


--
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/



Re: How Can I Use the FtpCommand Function with Cygwin?

2006-02-13 Thread Brian Dessent
skaller wrote:

> > 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.
> 
> Can you tell me how you link to OpenGL32.dll?

-lopengl32 ?

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/



Re: How Can I Use the FtpCommand Function with Cygwin?

2006-02-13 Thread skaller
On Mon, 2006-02-13 at 20:00 -0800, Brian Dessent wrote:

> 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.

Can you tell me how you link to OpenGL32.dll?

-- 
John Skaller 
Felix, successor to C++: http://felix.sf.net


--
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/



Re: How Can I Use the FtpCommand Function with Cygwin?

2006-02-13 Thread Brian Dessent
"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/