Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
5
rated 0 times [  5] [ 0]  / answers: 1 / hits: 16010  / 2 Years ago, mon, july 18, 2022, 6:08:21

I have written a tiny application for Ubuntu, and it works great. I am interested in cross-compiling it for Windows.



I have installed mingw32 from repository, and it compiles simple files very well. However, the app I want to compile for Windows uses some UNIX specific mechanism - for example it makes use of the sys/socket.h file, and the mingw compiler claims it can't find it.



One solution is to install Cygwin on a Windows machine, and try compiling the application from there, using Cygwin executables. Unfortunately, I don't have access to any Windows machine, as I don't own a copy that system. It would be perfect if I somehow could use Cygwin (with it's libraries and headers) on my Ubuntu to compile an .exe file.



There is no package with it in the repositories. Can anyone give me some on how to use Cygwin on Ubuntu?


More From » compiling

 Answers
5

Cygwin is a windows program that allows you to run linux programs in windows, so it wouldn't make any sense to have it in the repositories.



I suspect your only chance of having this work would be to run cygwin in wine.



It sounds like you have two separate questions:




  1. Can I use run Cygwin under Ubuntu to test the windows version I'm trying to build?

  2. How do I find windows libraries to use with mingw32 to replace the linux libraries I've been using?



As I said above, for 1, yes, you should be able to run cygwin in wine for testing.



Questions 2 is unrelated and should be moved to a different question. (For what it's worth, I have no idea about the answer to 2).


[#39997] Wednesday, July 20, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
throecember

Total Points: 274
Total Questions: 118
Total Answers: 132

Location: India
Member since Thu, Jun 11, 2020
4 Years ago
;