473,836 Members | 1,530 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 16752

"Abby" <ab*****@yahoo. com> wrote in message
news:b4******** *************** **@posting.goog le.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.

--
Andy Zhang
Nov 13 '05 #2
"Andy Zhang" <an**@visaapply .com> wrote in message news:<JD******* ************@ne ws01.bloor.is.n et.cable.rogers .com>...
"Abby" <ab*****@yahoo. com> wrote in message
news:b4******** *************** **@posting.goog le.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.
Nov 13 '05 #3
Abby wrote:
"Andy Zhang" <an**@visaapply .com> wrote in message news:<JD******* ************@ne ws01.bloor.is.n et.cable.rogers .com>...
"Abby" <ab*****@yahoo. com> wrote in message
news:b4****** *************** ****@posting.go ogle.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
3551
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 python from a foo.bat file, and windows barfs on the symbolic link. I replaced it with a hard link and all is well. Is there some reason this shouldn't be the standard installation
0
1707
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 information shows as follows: ---------------------------------------------------------- Using netCDF installation in /usr/local running build
3
1394
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 fot someone who wants to build it for me. It shouldn't be much work.
11
3980
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 thit .exe file to my friend he can't run it because he does not have the framwork 1.1 I thought that the this framework is just a large library of classes wich
2
2613
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, say for Chapter 02 and I have a few questions: 1. Where is the value set for CPPFLAGS as it is not being set in gcc.makefile?
5
6445
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 (japach:http://www.jikos.cz/jikos/japach/) but when I ran it on Windows with DEP turned on, I get a core file and inside that, it says "STATUS_ACCESS_VIOLATION". After searching through Google, most of the results came back were on making an exception to...
2
1194
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 meteorological purposes, but generally in the Unix/Linux environment. If anyone would be so kind as to compile the code snippet here into an executable I would so greatly appreciate it: You'll note the only two dependencies are stdio and zlib
5
476
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 http://www.easysoft.com/developer/languages/c/odbc_tutorial.html#dm_f...) i am attempting to compile. ODBCTest.c #include <stdio.h>
4
3287
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 I get: $ easy_install pysqlite Searching for pysqlite Reading http://pypi.python.org/simple/pysqlite/ Reading http://pysqlite.org/ Reading http://initd.org/pub/software/pysqlite/releases/2.3/2.3.3/ Reading http://pysqlite.sourceforge.net/
0
9826
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, weíll explore What is ONU, What Is Router, ONU & Routerís main usage, and What is the difference between ONU and Router. Letís take a closer look ! Part I. Meaning of...
0
10860
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10560
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10604
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10261
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6984
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5659
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4466
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3116
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.