473,395 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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

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
3 16701

"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
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: gry | last post by:
Under cygwin, the python executable is installed as python2.4.exe with a symbolic link to python.exe. This is fine as long as one is operating only withing the cygwin world. But I execute...
0
by: Zhuanshi He | last post by:
I try to compile ScientificPython-2.4.9 (http://starship.python.net/~hinsen/ScientificPython/) under Windows XP cygwin environment using python 2.3.3 ,and gcc (GCC) 3.3.3 (cygwin special). The...
3
by: Mike van der Hulst | last post by:
Hello, I'm not farmiliar with C++ programming. I want to try a software, but I only have the sourcefiles, not the executable for Win XP It's a EIB <--> XML driver application I'm looking...
11
by: bart | last post by:
Hello, I'm so sorry, but i don't understand the concept of the .net environment yet. I made a simple program that retrieves the hostname and ipaddress of the local computer. But when i give...
2
by: gmamla | last post by:
I am trying to learn C++ using "Thinking in C++" from Bruce Eckel. I have installed cygwin and GNU make on my windows XP. The samples are working fine. I am trying to understand the makefile,...
5
by: P | last post by:
I was wondering what sort of changes I need to make in order to make an application to be DEP compatible with on Windows XP x64 version 2003. I have compiled an open source C application...
2
by: wxforecaster | last post by:
I'm a VB programmer by trade (hold the tomatoes please), and I have a very small C utility that I need to compile into a windows executable. It's a widely used utility in academia for...
5
by: PG | last post by:
I am trying to compile a simple ODBC and C example on Windows XP SP2. I have Cygwin_NT 5.1. This is the code (obtained from...
4
by: Tilman Kispersky | last post by:
I am trying to install sqlite for use with python on cygwin. I have installed the sqlite packages from cygwin (that is libsqlite3-devel and libsqlite3_0). When attempting to easy_install pysqlite...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.