cygwin

GNU Make Under Windows: Check for cygwin in PATH

别等时光非礼了梦想. 提交于 2021-02-08 05:43:26
问题 I have been putting together a makefile in a Windows environment for my team to use. I decided to use MinGW's version of make for Windows. I put that executable with its dependencies into a repository location that should be in everyone's PATH variable. The executable was renamed "make.exe" for simplicity. Then I realized that I have to account for the case when someone has cygwin's bin folder in their path. Commands like echo, rmdir, and mkdir will call echo.exe, rmdir.exe, and mkdir.exe

Cygwin wraps text back on to the same line, causing text to be overwritten

泄露秘密 提交于 2021-02-07 14:40:40
问题 I have cygwin installed on my Windows 7 box and I have been running into a problem where when I type a command it will occasionally be wrapped back onto the same line, deleting the bash prompt. Here is an example: The command in question is command "201" (4 lines from the bottom). I included the others for context. The text of the command I was typing was git commit -m "Forced LF line endings." ( Note: I am posting this with mostly git commands, but the problem occurs with any command. I have

Cygwin wraps text back on to the same line, causing text to be overwritten

余生颓废 提交于 2021-02-07 14:38:45
问题 I have cygwin installed on my Windows 7 box and I have been running into a problem where when I type a command it will occasionally be wrapped back onto the same line, deleting the bash prompt. Here is an example: The command in question is command "201" (4 lines from the bottom). I included the others for context. The text of the command I was typing was git commit -m "Forced LF line endings." ( Note: I am posting this with mostly git commands, but the problem occurs with any command. I have

Cannot run C program from Java using Cygwin

烈酒焚心 提交于 2021-02-07 13:26:54
问题 I'm trying to make my first Java/C program using JNI. Here's how 'my' code looks - it's copied from this website: /* HelloWorld.java */ public class HelloWorld { native void helloFromC(); static { System.loadLibrary("ctest"); } static public void main(String argv[]) { HelloWorld helloWorld = new HelloWorld(); helloWorld.helloFromC(); } } C part: /* ctest.c */ #include <jni.h> #include <stdio.h> JNIEXPORT void JNICALL Java_HelloWorld_helloFromC (JNIEnv * env, jobject jobj) { printf("Hello from

Cannot run C program from Java using Cygwin

杀马特。学长 韩版系。学妹 提交于 2021-02-07 13:26:00
问题 I'm trying to make my first Java/C program using JNI. Here's how 'my' code looks - it's copied from this website: /* HelloWorld.java */ public class HelloWorld { native void helloFromC(); static { System.loadLibrary("ctest"); } static public void main(String argv[]) { HelloWorld helloWorld = new HelloWorld(); helloWorld.helloFromC(); } } C part: /* ctest.c */ #include <jni.h> #include <stdio.h> JNIEXPORT void JNICALL Java_HelloWorld_helloFromC (JNIEnv * env, jobject jobj) { printf("Hello from

wait for gdb to attach [duplicate]

て烟熏妆下的殇ゞ 提交于 2021-02-06 10:15:27
问题 This question already has answers here : Is there any way to tell gdb to wait for a process to start and attach to it? (6 answers) Closed 2 years ago . I've been using gdb normally for 1 or 2 projects. I.e. I invoke gdb --args prog args . gdb runs in the same tty as the program I'm debugging. However my latest project is modifying the dtach utility. This is a program like screen, so the tty's are redirected elsewhere, thus I have to use gdb's attach functionality. The problem with gdb attach

wait for gdb to attach [duplicate]

浪尽此生 提交于 2021-02-06 10:15:05
问题 This question already has answers here : Is there any way to tell gdb to wait for a process to start and attach to it? (6 answers) Closed 2 years ago . I've been using gdb normally for 1 or 2 projects. I.e. I invoke gdb --args prog args . gdb runs in the same tty as the program I'm debugging. However my latest project is modifying the dtach utility. This is a program like screen, so the tty's are redirected elsewhere, thus I have to use gdb's attach functionality. The problem with gdb attach

Unable to run cygwin in Windows Docker Container

跟風遠走 提交于 2021-02-06 10:09:54
问题 I've been working with Docker for Windows, attempting to create a Windows Container that can run cygwin as the shell within the container itself. I haven't had any luck getting this going yet. Here's the Dockerfile that I've been messing with. # escape=` FROM microsoft/windowsservercore SHELL ["powershell", "-command"] RUN Invoke-WebRequest https://chocolatey.org/install.ps1 -UseBasicParsing | Invoke-Expression RUN choco install cygwin -y RUN refreshenv RUN [Environment]:

Git showing identical files as changed

强颜欢笑 提交于 2021-02-05 19:59:37
问题 Git is showing me an entire file is changed, when I can't seem to figure out the changes. This is cygwin git, but it also happens in msysgit $ git --version git version 2.1.1 $ diff <(git show HEAD:File.cs) <(cat File.cs) // Shows no differences $ diff <(git show HEAD:File.cs | xxd) <(xxd File.cs) // Shows no differences $ git diff // shows the entire file has changed $ git hash-object <(git show HEAD:File.cs) 7b3762473342a5b040835bfef9f6b45c109ba48b $ git hash-object <(cat File.cs)

Install Protocol Buffers on Windows

拈花ヽ惹草 提交于 2021-02-05 19:40:43
问题 I am unable to find clear instructions to install Google Protocol Buffers (including compiler) on Windows x64 platform. I went through the instructions README file for compiler and source: For Compiler: To install, simply place this binary somewhere in your PATH I added system variable to Path: PROTOC 'C:\dev_tools\protoc-2.4.1-win32' I am stuck on installing Protocol Buffers source using Cygwin. I tried following Unix instructions provided in the readme file: To build and install the C++