Reputation: 47
I am a newbie in cygwin. However, I have used mingw so far, but it is not supporting fork(), so I need to switch to cygwin. I have created a build.bat file in my mingw (programming language C):
gcc -o mask mask.c -pg -I/c/opencv/build/include -lopencv_core231 -lopencv_highgui231 -lopencv_imgproc231 -L. -L/c/opencv/build/x86/mingw/lib
Can anyone suggest me how I can run this .bat file at cygwin or refer me to a site.
How can I run mingw executable with cygwin? Any refernce will be appreciated.
Thanks for your help
Emon
Upvotes: 1
Views: 242
Reputation: 59677
I believe that cygwin can run cmd
(DOS command interpreter), which can then run your batch file. The problem is that cmd
won't be able to use the non-windows paths that you have in your batch script. Try to run: cmd /c myBuildFile.bat
at a cygwin prompt, and you should see what I mean.
It is better to use cygwin-style tools for making a build script. You should have the make
program on your path which will allow you to write simple and more complex build scripts.
Alternatively you could convert your .bat
build script into a shell script, something like this:
#!/bin/sh
gcc -o mask mask.c -pg -I/c/opencv/build/include -lopencv_core231 -lopencv_highgui231 -lopencv_imgproc231 -L. -L/c/opencv/build/x86/mingw/lib
Name it anything, e.g. myBuildScript.sh, then make it executable with: chmod u+x myBuildScript.sh
.
Upvotes: 2