Want to build Win32 API code and Posix API code in Cygwin

2014-02-23 Thread Qw Liu
Hi All,
I have legacy code (part A) written in Posix API that I want to
port to Windows, and there is also some other necessary code (part B)
written in Win32 API, but seems that I cannot use GCC on Cygwin to
build them (A and B) together to get the executable program, since I
met issue like "header missing" for Win32 API .
Is there any other method to resolve such problem? I considerred
to build part B as dll first and build with part A on Cygwin. Is that
okay?
Thanks a lot for your guidance!

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Clearing the buffer after quitting LESS, MAN, VIM etc.

2014-02-23 Thread Andrey Repin
Greetings, Christopher Faylor!

>So, I did go ahead and implement this in Cygwin by switching console
>buffers.  It works great in a cmd window but not at all in a TCMD
> window.  I have used jpsoftware products for
>longer than I've been working on Cygwin so that's personally a bad bug
>for me.

>>
>>>If I can find some way of detecting when I'm in a TCMD environment I
>>>might just fall back to the old code.
>>
>>Don't they have a direct API to answer this kind of questions?

> I sort of asked them that but they haven't replied yet.  Do you know of
> something?  I don't see anything pertinent in their documentation.

Nothing from the top of my head. I've worked with their GUI briefly in the
beginning, then reverted to pure console (4NT back in the days) due to a
number of incompatibilities with existing apps, and never looked back.


--
WBR,
Andrey Repin (anrdae...@yandex.ru) 24.02.2014, <08:33>

Sorry for my terrible english...


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Unpacking 7z archives on Cygwin64

2014-02-23 Thread Steven Penny
On Sun, Feb 23, 2014 at 3:46 PM, Angelo Graziosi wrote:
> On Cygwin64, is there an utility to unpack .7z archives?

If you have 7-zip already installed, you can use that

sp 'hklm:system/currentcontrolset/control/session manager/environment' `
  path "$env:path;%systemdrive%/program files/7-zip"

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Clearing the buffer after quitting LESS, MAN, VIM etc.

2014-02-23 Thread Christopher Faylor
On Mon, Feb 24, 2014 at 04:42:25AM +0400, Andrey Repin wrote:
>Greetings, Christopher Faylor!
So, I did go ahead and implement this in Cygwin by switching console
buffers.  It works great in a cmd window but not at all in a TCMD
 window.  I have used jpsoftware products for
longer than I've been working on Cygwin so that's personally a bad bug
for me.
>>>
>
>>If I can find some way of detecting when I'm in a TCMD environment I
>>might just fall back to the old code.
>
>Don't they have a direct API to answer this kind of questions?

I sort of asked them that but they haven't replied yet.  Do you know of
something?  I don't see anything pertinent in their documentation.

cgf

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Clearing the buffer after quitting LESS, MAN, VIM etc.

2014-02-23 Thread Andrey Repin
Greetings, Christopher Faylor!

>>> So, I did go ahead and implement this in Cygwin by switching console
>>> buffers.  It works great in a cmd window but not at all in a TCMD
>>>  window.  I have used jpsoftware products for longer
>>> than I've been working on Cygwin so that's personally a bad bug for me.
>>

> If I can find some way of detecting when I'm in a TCMD environment I might
> just fall back to the old code.

Don't they have a direct API to answer this kind of questions?


--
WBR,
Andrey Repin (anrdae...@yandex.ru) 24.02.2014, <04:41>

Sorry for my terrible english...


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Clearing the buffer after quitting LESS, MAN, VIM etc.

2014-02-23 Thread Christopher Faylor
On Mon, Feb 24, 2014 at 03:28:53AM +0400, Andrey Repin wrote:
>Greetings, Christopher Faylor!
>
>> So, I did go ahead and implement this in Cygwin by switching console
>> buffers.  It works great in a cmd window but not at all in a TCMD
>>  window.  I have used jpsoftware products for longer
>> than I've been working on Cygwin so that's personally a bad bug for me.
>
>The only other console emulator I know is 
>http://code.google.com/p/conemu-maximus5/

There are several more that I'm aware of.

>> I'm trying to file a bug report but I wonder if this will cause a
>> problem for other console programs if it doesn't work for a popular
>> commercial product.
>
>Not to break your hope, but I've had very poor experience with their tech
>support so far.
>(And yes, I'm using their products since 1998, at least.)

I've had the opposite experience.  I actually got a response to my query.  If
I can find some way of detecting when I'm in a TCMD environment I might just
fall back to the old code.

cgf

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Clearing the buffer after quitting LESS, MAN, VIM etc.

2014-02-23 Thread Andrey Repin
Greetings, Christopher Faylor!

> So, I did go ahead and implement this in Cygwin by switching console
> buffers.  It works great in a cmd window but not at all in a TCMD
>  window.  I have used jpsoftware products for longer
> than I've been working on Cygwin so that's personally a bad bug for me.

The only other console emulator I know is 
http://code.google.com/p/conemu-maximus5/

> I'm trying to file a bug report but I wonder if this will cause a
> problem for other console programs if it doesn't work for a popular
> commercial product.

Not to break your hope, but I've had very poor experience with their tech
support so far.
(And yes, I'm using their products since 1998, at least.)


--
WBR,
Andrey Repin (anrdae...@yandex.ru) 24.02.2014, <03:24>

Sorry for my terrible english...


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Change Directory

2014-02-23 Thread David Stacey

On 23/02/14 22:27, Todd Poole wrote:
Getting confused on something. From bash terminal I can change 
directory like so:


$ cd /c/directoryname

But if the directory has multi words it does not recognize the directory:

$ cd /c/my directory name

Is there a way to get cygwin to recognize multiple names in a directory?


Either surround the whole path in quotes, or use a backslash character 
'\' before each space:


cd "/c/my directory name"
cd /c/my\ directory\ name

Dave.


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Unpacking 7z archives on Cygwin64

2014-02-23 Thread Adam Dinwoodie
On Sun, Feb 23, 2014 at 10:46:54PM +0100, Angelo Graziosi wrote:
> On Cygwin64, is there an utility to unpack .7z archives?

No.  The Cygwin utility for 7z archives is p7zip, but that's one of the
packages that hasn't been ported to 64-bit Cygwin yet.

Compare:
http://cygwin.com/cgi-bin2/package-grep.cgi?grep=7z&arch=x86
http://cygwin.com/cgi-bin2/package-grep.cgi?grep=7z&arch=x86_64

While you wait for an official 64-bit p7zip package to be produced, the
options I can see are:

- Swap to 32-bit Cygwin
- Obtain the p7zip source code and build it for 64-bit Cygwin yourself
- Use native Windows 7z tools

Adam

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: Unpacking 7z archives on Cygwin64

2014-02-23 Thread David Stacey

On 23/02/14 21:46, Angelo Graziosi wrote:
On Cygwin64, is there an utility to unpack .7z archives? 


I don't think so. You'd need the p7zip package, which hasn't been built 
for 64-bit yet.


Dave.


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Change Directory

2014-02-23 Thread Todd Poole

Hi all,
Getting confused on something. From bash terminal I can change directory 
like so:


$ cd /c/directoryname

But if the directory has multi words it does not recognize the directory:

$ cd /c/my directory name

Is there a way to get cygwin to recognize multiple names in a directory?

Thanks
--
Todd Poole

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: aplay (audio) support for cygwin - solution

2014-02-23 Thread David Stacey

On 23/02/2014 15:14, Dr. Alexander Kleinsorge wrote:

using this free 31 kB tool, download "sounder.exe"
(sourcecode free avail., but VisualBasic)
#http://www.elifulkerson.com/projects/commandline-wav-player.php
and copy to /usr/bin/sounder (.exe)


If you just need to play a wav file on the command line, you may be able 
to use sox. Install the Cygwin packages 'sox' and 'sox-fmt-*', then:


export AUDIODRIVER=ao
play your_wav_file.wav

Cheers,

Dave.




--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Unpacking 7z archives on Cygwin64

2014-02-23 Thread Angelo Graziosi

On Cygwin64, is there an utility to unpack .7z archives?


Thanks,
 Angelo.

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



aplay (audio) support for cygwin - solution

2014-02-23 Thread Dr. Alexander Kleinsorge
Hi Cygwin-Team

I have a working suggestion to support basic aplay funcionallity for cygwin.
(aplay plays audio from command line.)

using this free 31 kB tool, download "sounder.exe"
(sourcecode free avail., but VisualBasic)
# http://www.elifulkerson.com/projects/commandline-wav-player.php
and copy to /usr/bin/sounder (.exe)


# 1st Option: attached (2kB) aplay.c (my code, no restrictions)
gcc -O1 -o aplay.exe aplay.c
and copy to /usr/bin/
(only basic options supported, but covers most usecases)
http://www.physik.tu-berlin.de/~aleks/aplay.c

# 2nd Option: Alias for bash
alias aplay_q='/usr/bin/sounder ' # -q --quiet
aplay () { file "$1" && sounder "$1"; } # default

Thanks for reading, Alexander



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple