Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > How to make a program compile by Cygwin executable in Windows ?

Reply
Thread Tools

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

 
 
Abby
Guest
Posts: n/a
 
      07-01-2003
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.
 
Reply With Quote
 
 
 
 
Andy Zhang
Guest
Posts: n/a
 
      07-01-2003

"Abby" <> wrote in message
news: 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


 
Reply With Quote
 
 
 
 
Abby
Guest
Posts: n/a
 
      07-02-2003
"Andy Zhang" <> wrote in message news:<JDnMa.36670$ ble.rogers.com>...
> "Abby" <> wrote in message
> news: 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.
 
Reply With Quote
 
Tom St Denis
Guest
Posts: n/a
 
      07-02-2003
Abby wrote:
> "Andy Zhang" <> wrote in message news:<JDnMa.36670$ ble.rogers.com>...
>
>>"Abby" <> wrote in message
>>news:. 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
How to Compile JNI program on windows/cygwin Suresh Java 2 05-31-2006 11:42 PM
Re: how to compile python program to linux executable sreekant Python 0 07-18-2003 05:54 PM
Re: how to compile python program to linux executable =?ISO-8859-1?Q?Gerhard_H=E4ring?= Python 0 07-15-2003 09:04 AM
how to compile python program to linux executable Ruslan Spivak Python 0 07-15-2003 08:48 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57