LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices

Reply
 
LinkBack Search this Thread
Old 01-14-2011, 03:05 AM   #1
qrange
Member
 
Registered: Jul 2006
Location: Belgrade, Serbia
Distribution: Debian
Posts: 486

Rep: Reputation: 19
Cygwin problem, libc6


I'm not sure if this is the right sub-forum..

There is this program that compiles and runs nice on Linux Debian, but I need it to compile in Windows XP, so that it can run there as *.exe
I installed Cygwin but it seems some libraries are missing. The source file says I need, among other things, this in Debian: libc6-dev

How to install that in Cygwin? (make complains about stubs.h)


thanks.
 
Old 01-14-2011, 01:09 PM   #2
John VV
Guru
 
Registered: Aug 2005
Location: Ann Arbor Mi.
Distribution: OpenSUSE 11.4 & Scientfic Linux 6.1
Posts: 7,280

Rep: Reputation: 706Reputation: 706Reputation: 706Reputation: 706Reputation: 706Reputation: 706Reputation: 706
if it is a linux.exe then it was built in MniGW and NOT CygWin

you need to use the MinGW .la or use dilltool to make the MS .dll
Gnome.org has large section for mingw

Last edited by John VV; 01-14-2011 at 01:10 PM.
 
Old 01-15-2011, 03:56 AM   #3
qrange
Member
 
Registered: Jul 2006
Location: Belgrade, Serbia
Distribution: Debian
Posts: 486

Original Poster
Rep: Reputation: 19
I don't understand, its not linux.exe
The program is opensource, I downloaded it as tar.gz and it compiles nicely in Debian just using command 'make'.
But, now I want windows binaries. Preferably so that it works in Cygwin 'environment' on Windows, because it uses some system commands (namely 'mkfifo').
and compiling needs to be done in Linux, because windows Cygwin lacks libc6 and other stuff.
 
Old 01-15-2011, 11:41 AM   #4
John VV
Guru
 
Registered: Aug 2005
Location: Ann Arbor Mi.
Distribution: OpenSUSE 11.4 & Scientfic Linux 6.1
Posts: 7,280

Rep: Reputation: 706Reputation: 706Reputation: 706Reputation: 706Reputation: 706Reputation: 706Reputation: 706
you stated the program WAS A EXE FILE
Quote:
so that it can run there as *.exe I installed Cygwin
therefor it was NOT A CYGWIN BUILD BUT A MINGW ONE !!!

cygwin dose NOT build librarys for windows *.exe files mingw dose ( .la and windows .dll's )
Quote:
But, now I want windows binaries
cugwin dose NOT build windows binary’s. MinGW dose
Quote:
Preferably so that it works in Cygwin 'environment' on Windows
cugwin RUNS linux binary’s ON WINDOWS

cygwin DOSE NOT run windows binary’s MinGW dose


for cygwin just build the lib ON windows in the
c:\\CygWinRoot/usr/src/???
at you would on linux and install it ( --prefix=/usr)
 
Old 01-15-2011, 08:14 PM   #5
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian
Posts: 1,421

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
You can compile things in Cygwin, but you need to install gcc first. I think the Cygwin setup.exe acts as a package manager. You'll need make, gcc, and libc-devel (Cygwin is from Redhat, so it uses the -devel suffix not -dev).
 
Old 01-15-2011, 08:39 PM   #6
John VV
Guru
 
Registered: Aug 2005
Location: Ann Arbor Mi.
Distribution: OpenSUSE 11.4 & Scientfic Linux 6.1
Posts: 7,280

Rep: Reputation: 706Reputation: 706Reputation: 706Reputation: 706Reputation: 706Reputation: 706Reputation: 706
mingw is now using the same style as Cygwin
the setup/install.exe IS the package manager
as i recall the Ibidio.com is one of the fastest mirrors
 
Old 01-17-2011, 01:24 AM   #7
qrange
Member
 
Registered: Jul 2006
Location: Belgrade, Serbia
Distribution: Debian
Posts: 486

Original Poster
Rep: Reputation: 19
Quote:
Originally Posted by John VV View Post
cugwin RUNS linux binary’s ON WINDOWS
No, it doesn't. All commands in C:\cygwin\bin are .EXE files. If I copy Linux binaries there it says: "cannot execute binary file".

Now I want to run crosscompiler in Linux to get Windows binary, because Linux has all the needed libraries.

Last edited by qrange; 01-17-2011 at 01:41 AM.
 
Old 01-17-2011, 06:09 PM   #8
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian
Posts: 1,421

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Quote:
Originally Posted by qrange View Post
No, it doesn't. All commands in C:\cygwin\bin are .EXE files. If I copy Linux binaries there it says: "cannot execute binary file".

Now I want to run crosscompiler in Linux to get Windows binary, because Linux has all the needed libraries.
In the same way you can't use Linux executables in Cygwin, you can't use the libraries either. Cygwin is (mostly) source compatible with Linux, not binary compatible. I think you can cross compile from Linux, but you will need to cross compile the libraries as well.
 
Old 01-18-2011, 01:33 AM   #9
qrange
Member
 
Registered: Jul 2006
Location: Belgrade, Serbia
Distribution: Debian
Posts: 486

Original Poster
Rep: Reputation: 19
I see, well there must be an option to include the compiled libraries when making .exe? I mean the crosscompiler in Linux could search for installed source files of needed libraries and 'attach' them to the source of program, so that the result is just one file, right?
 
Old 01-18-2011, 02:58 PM   #10
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian
Posts: 1,421

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Yes you can do static linking which includes the libraries in the final exe. I still think it's easier to setup the compiler on Cygwin than setting up a cross compiler on Linux.
 
  


Reply

Tags
cygwin


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Libc6 MAJOR problem Chris102 Debian 13 02-07-2010 12:57 PM
Have you ever used cygwin, i've met a problem with the command stat from cygwin andy820303 Linux - Newbie 0 03-12-2009 11:44 AM
libc6-dev version conflicts with libc6 in Dapper peppill Ubuntu 2 12-04-2006 01:13 PM
libstdc++-libc6.2-2.so.3 problem.. my_aro Ubuntu 4 01-05-2006 07:41 AM
libc6 problem otaking.se Debian 0 09-24-2004 01:52 PM


All times are GMT -5. The time now is 07:22 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration