By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,301 Members | 1,766 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,301 IT Pros & Developers. It's quick & easy.

How to make a program compile by Cygwin executable in Windows ?

P: n/a
I'm now using Cygwin as my compiler for C code. I use Dev-c++ as my
editor.
The reason why I chose Cygwin compiler instead of the compiler that
came with Dev-C++ is that I believe it uses the same environment as in
Linux, so that I don't have to write different sourcecode for both OS.
Eventhough, I don't understand about Linux much, and I'm still a
beginner in programming, I still have to make my program compatible
with both OS (Windows and Linux).

The thing is, I couldn't run my program in other Windows PC. It will
report that it need cygwin1.dll ... Anybody knows how to get through
this problem? Please, please, please ... let me know. Thank you.
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a

"Abby" <ab*****@yahoo.com> wrote in message
news:b4*************************@posting.google.co m...
I'm now using Cygwin as my compiler for C code. I use Dev-c++ as my
editor.
The reason why I chose Cygwin compiler instead of the compiler that
came with Dev-C++ is that I believe it uses the same environment as in
Linux, so that I don't have to write different sourcecode for both OS.
Eventhough, I don't understand about Linux much, and I'm still a
beginner in programming, I still have to make my program compatible
with both OS (Windows and Linux).

The thing is, I couldn't run my program in other Windows PC. It will
report that it need cygwin1.dll ... Anybody knows how to get through
this problem? Please, please, please ... let me know. Thank you.


Cygwin executables need the Cygwin library to, in a sense, convert unix
system calls to win32 API calls. You need to recompile the program for
Windows. Alternatively, you could distribute your program with the Cygwin
DLL.

--
Andy Zhang
Nov 13 '05 #2

P: n/a
"Andy Zhang" <an**@visaapply.com> wrote in message news:<JD*******************@news01.bloor.is.net.ca ble.rogers.com>...
"Abby" <ab*****@yahoo.com> wrote in message
news:b4*************************@posting.google.co m...
I'm now using Cygwin as my compiler for C code. I use Dev-c++ as my
editor.
The reason why I chose Cygwin compiler instead of the compiler that
came with Dev-C++ is that I believe it uses the same environment as in
Linux, so that I don't have to write different sourcecode for both OS.
Eventhough, I don't understand about Linux much, and I'm still a
beginner in programming, I still have to make my program compatible
with both OS (Windows and Linux).

The thing is, I couldn't run my program in other Windows PC. It will
report that it need cygwin1.dll ... Anybody knows how to get through
this problem? Please, please, please ... let me know. Thank you.


Cygwin executables need the Cygwin library to, in a sense, convert unix
system calls to win32 API calls. You need to recompile the program for
Windows. Alternatively, you could distribute your program with the Cygwin
DLL.


Can you tell me how to distribute my program with Cygwin DLL? Thank you.
Nov 13 '05 #3

P: n/a
Abby wrote:
"Andy Zhang" <an**@visaapply.com> wrote in message news:<JD*******************@news01.bloor.is.net.ca ble.rogers.com>...
"Abby" <ab*****@yahoo.com> wrote in message
news:b4*************************@posting.google. com...
I'm now using Cygwin as my compiler for C code. I use Dev-c++ as my
editor.
The reason why I chose Cygwin compiler instead of the compiler that
came with Dev-C++ is that I believe it uses the same environment as in
Linux, so that I don't have to write different sourcecode for both OS.
Eventhough, I don't understand about Linux much, and I'm still a
beginner in programming, I still have to make my program compatible
with both OS (Windows and Linux).

The thing is, I couldn't run my program in other Windows PC. It will
report that it need cygwin1.dll ... Anybody knows how to get through
this problem? Please, please, please ... let me know. Thank you.


Cygwin executables need the Cygwin library to, in a sense, convert unix
system calls to win32 API calls. You need to recompile the program for
Windows. Alternatively, you could distribute your program with the Cygwin
DLL.

Can you tell me how to distribute my program with Cygwin DLL? Thank you.


Copy cygwin1.dll from the cygwin/bin dir. I dunno what the license is
regarding that though.

A good way to test if you have all the dlls you need is to set the path
to empty, e.g.

set PATH=

then run you app. If the additional dlls are required and they are not
in the dir where you run the app from windows will report an error.

Alternatively, you could compile as "-mno-cygwin" or use mingw if you
don't need the unix like behaviour.

Tom

Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.