Questions tagged [cygwin]

Cygwin is a collection of GNU and other Unix-like FOSS tools which run on MS Windows and provide functionality similar to a GNU/Linux distribution while (mostly) conforming to POSIX specifications. Use this tag for questions about developing programs and/or scripts to run in this environment. Questions on the *use* of tools in a Cygwin environment are more appropriate for Super User (https://superuser.com).

Cygwin is a Unix-like environment and command-line interface for Microsoft Windows. Cygwin provides native integration of Windows-based applications, data, and other system resources with applications, software tools, and data of the Unix-like environment. Thus it is possible to launch Windows applications from the Cygwin environment, as well as to use Cygwin tools and applications within the Windows operating context.

Cygwin consists of two parts: a dynamic-link library () as an API compatibility layer providing a substantial part of the API functionality, and an extensive collection of software tools and applications that provide a Unix-like look and feel.

Cygwin is:

  • a collection of tools which provide a Linux look and feel environment for Windows.
  • a DLL (cygwin1.dll) which acts as a Linux API layer providing substantial Linux API functionality.

Cygwin is not:

  • a way to run native Linux apps on Windows. You must rebuild your application from source if you want it to run on Windows.
  • a way to magically make native Windows apps aware of UNIX® functionality like signals, `ptys, etc. Again, you need to build your apps from source if you want to take advantage of Cygwin functionality.

The Cygwin DLL currently works with all recent, commercially released x86 32 bit and 64 bit versions of Windows, with the exception of Windows CE and Windows NT4.

Official Website: http://www.cygwin.com/

Useful Links:

7878 questions
3
votes
1 answer

Does steady_clock have only 10ms resolution on windows/cygwin?

I have suprising observation that steady_clock gives poor 10ms resolution when measuring durations. I compile for windows under cygwin. Is it sad true or am I doing sth wrong? auto start = std::chrono::steady_clock::now(); /*...*/ auto end =…
ardabro
  • 1,907
  • 16
  • 31
3
votes
1 answer

What is the analogue of CTRL + ARROW in cygwin bash?

In Windows applications in general, we can step over words by using CTRL+ -> to step right and CTRL + <- to step left. But in Bash, those combinations print 3C and 3D correspondingly. Is there the analogue of such combination in Cygwin Bash at all?
user3663882
  • 6,957
  • 10
  • 51
  • 92
3
votes
1 answer

Selectively search and replace certain lines using a regular expression

I have a file containing a lot of SQL statements, such as: CREATE TABLE "USER" ( "ID" INTEGER PRIMARY KEY, "NAME" CHARACTER VARYING(50) NOT NULL, "AGE" INTEGER NOT NULL ); COPY "USER" (id, name, age) FROM stdin; 1 Skywalker 19 2 …
Etienne Neveu
  • 12,604
  • 9
  • 36
  • 59
3
votes
1 answer

Python: Running from cygwin works, while running from PyCharm doesn't

I can successfully run a python script that uses from sklearn.cluster import DBSCAN from the 64 bit cygwin terminal prompt which uses a 64bit build of python 2.7. When I run the same from both 64 bit and 32 bit pycharm with -vv interpreter options,…
Jonno_FTW
  • 8,601
  • 7
  • 58
  • 90
3
votes
1 answer

How to implement AES encryption in C?

I'm so confused right now. I have an AES encryption in mind and i copy and paste it in notepad++ and save it as a .c file. Then I goto cygwin and try running it and it says "include aes.h" not found. I have searched the internet for this everywhere…
CoolDude
  • 131
  • 1
  • 2
  • 10
3
votes
0 answers

Activator/Play commands make Cygwin bash commands invisible

I'm using Cygwin and any time I use an Activator command (e.g., activator run or activator "eclipse with-source=true"), any text thereafter is invisible. It's being typed, because if I hit enter, the command will be executed, but I cannot see…
liltitus27
  • 1,670
  • 5
  • 29
  • 46
3
votes
3 answers

How to disable warning in CMake 3.1 about cygwin WIN32 not being defined?

I have never used CMake before, but I'm trying out an IDE (CLion) that doesn't support any other build system, so am giving it a try. I get the following warning at the start of every build: CMake Warning at …
Jules
  • 14,841
  • 9
  • 83
  • 130
3
votes
0 answers

I deleted /dev/stdout on Cygwin. How can I restore it? How can I prevent it from happening again?

Basically I ran the following as a test: $ gcc -c -xc - -o /dev/stdout <<<'int main(){return 0;}' I got an error (Fatal error: can't write /dev/stdout: Illegal seek), and I then found that (presumably as a clean-up step) gcc deleted /dev/stdout.…
Matt
  • 21,026
  • 18
  • 63
  • 115
3
votes
1 answer

Is mingw slower than cygwin when running compiled mex code in matlab?

I am using gnumex in Matlab in Windows for setting up mex for compiling c++ code. There is a problem with setup for Cygwin which prevents me from using fopen. Hence, I installed mingw which solves the issue of fopen. But for a program which does not…
lonstud
  • 525
  • 2
  • 19
3
votes
2 answers

Problems compiliing c++ code using cygwin

I am trying to compile some source code in cygwin (in windows 7) and get the following error when I run the make file g++ -DHAVE_CONFIG_H -I. -I.. -I.. -Wall -Wextra -Werror -g -O2 -MT libcommon_a Fcntl.o -MD -MP -MF .deps/libcommon_a-Fcntl.Tpo…
user343403
  • 31
  • 2
3
votes
4 answers

Python, Cygwin - ImportError: No module named _psycopg

I used the article on https://github.com/nwcell/psycopg2-windows and https://bitbucket.org/topper/psycopg2-win64-py27/overview to get psycopg2 installed and working on Python2.7 and Cygwin. The install ran fine and i see the package in the…
myloginid
  • 1,463
  • 2
  • 22
  • 37
3
votes
1 answer

Run and compile java code in cygwin

I just installed cygwin and I am wondering how do I compile and run my java code through cygwin? My java code is at my desktop saved in a file named Java.
Luffy
  • 51
  • 1
  • 1
  • 9
3
votes
2 answers

The Git Bash console crashes on open

I have been using Git Bash version 1.9.5 on Windows 8 successfully for a few weeks. This morning it stopped working. Every time I open Git Bash it shows up for a second and then crashes. I have searched everywhere for solutions; every forum says to…
3
votes
5 answers

Help with Cygwin bash file

I have a bash file, which I’m trying to run in Cygwin on a Windows 7 platform, but I gives me some odd errors when doing so. The bash file works on my Linux system. The bach file looks like this: for ((r=0; r <10; r++)) netcat localhost 4444 <…
Emil Devantie Brockdorff
  • 4,724
  • 12
  • 59
  • 76
3
votes
0 answers

using extern thread_local in C++11 on Cygwin/AMD64

I am having linking issues when using thread_local keyword in Cygwin with its GCC 4.8.3 and GCC 4.9.2. This is derived from log4cplus. The test case is split into three files: File def.hxx: #include namespace N { struct S { std::string…
wilx
  • 17,697
  • 6
  • 59
  • 114