X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:content-transfer-encoding :content-type:message-id:date:from:reply-to:to:subject :references:in-reply-to; q=dns; s=default; b=YgDEzTxLEZBrEYUzk86 rrFuISTtA3p1q0yLRK/VPk/KqvUJFZG1onkp1sW5moujvvRIpuMRB5WemehugWEJ YOk+GGVqEFbuHdDww3mAu3rq6czlry2nsfqofpX2EMTnBLxt4QM02d0DwmVY6YeO RxN9R5mpl30WWiwBYU/DTtEA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:content-transfer-encoding :content-type:message-id:date:from:reply-to:to:subject :references:in-reply-to; s=default; bh=k2RR5Xhnw0PEpvz+HZ7iWktCy oA=; b=Vhz/d52ebuxzHy8rreyz38DynqxNKvlru31dCNfLA5ODmFJvqxYl9CE+F ruw7E2tv6ldXNdgdD+CtQtAIHFjyOg3y5RXDvwSKLsSVh0kJw7IhTy34k0dy/1Qh YOFt7mkORpL3sagE6jeg59JHbLAV33OLoNzBa74hwdMVPARIw4= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: vms173023pub.verizon.net MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; charset=ISO-8859-1; format=flowed Message-id: <54051B91.6030203@cygwin.com> Date: Mon, 01 Sep 2014 21:21:21 -0400 From: "Larry Hall (Cygwin)" Reply-to: cygwin AT cygwin DOT com User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 To: cygwin AT cygwin DOT com Subject: Re: cross-compiling to Linux? References: <016b01cfc50b$3c3d5bc0$b4b81340$@gmail.com> In-reply-to: <016b01cfc50b$3c3d5bc0$b4b81340$@gmail.com> On 08/31/2014 07:03 AM, Juhász Ádám wrote: > Hi everyone, > > When I was developing one of my program, I've tried to compile it under > Cygwin, and for some reason Cygwin's g++ always compiled it without > extension (and maybe an ELF executable?), so I had to create an explicit > rule to compile it with the EXE extension. > > However just before I also installed MinGW so I can see what libraries does > that includes, I've noticed that Cygwin created an ELF executable (utterly > useless in Windows) however I deleted it without a second thought and just > then I've realized that I should've tried whether it runs on a Linux > machine. (My assumption was that it possibly was a PE executable with an ELF > header.) Now I've installed MinGW, and right after that, Cygwin also > generates proper PE executables for Windows, and can't seem to force it to > compile it as ELF executable despite all it took was to omit the EXE > extension. > > Was this the proper behavior for Cygwin that MinGW changed? > What could possibly have MinGW did to change this behavior? > Is it *really* possible to cross-compile to Linux with Cygwin-Not that it > isn't possible, but whether is it possible by a basic setup or does Cygwin > provides a special package for that (or neither)? I can't speak to what you saw initially but interpreting the results you got as an ELF executable is incorrect. Cygwin's build tools target Windows/ PE executables. As for cross-compiling with Cygwin, see the gcc FAQ on the subject: -- Larry _____________________________________________________________________ A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting annoying in email? -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple