GeneralThis forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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)
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.
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).
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.
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.