Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Date: Thu, 5 May 2005 09:11:42 +0930 From: Brian Salter-Duke To: cygwin AT cygwin DOT com Subject: Re: Using -mno-cygwin flag Message-ID: <20050504234142.GB7464@monster.octa4.net> Reply-To: Brian Salter-Duke Mail-Followup-To: cygwin AT cygwin DOT com References: <42789D45 DOT 6F74436D AT dessent DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42789D45.6F74436D@dessent.net> User-Agent: Mutt/1.5.4i On Wed, May 04, 2005 at 03:00:37AM -0700, Brian Dessent wrote: > Brian Salter-Duke wrote: > > > Beginning the DDI compilation at Wed May 4 18:09:43 AUSCST 2005 > > Compiling common object: soc_create.o > > gcc -DLINUX -O3 -mno-cygwin -fstrict-aliasing -I./include -DDDI_SOC -DMAX_SMP_PROCS=8 -DMAX_NODES=32 -c ./src/soc_create.c -o ./obj/soc_create.o > > In file included from src/soc_create.c:21: > > include/mysystem.h:34:28: sys/resource.h: No such file or directory > > include/mysystem.h:73:23: pthread.h: No such file or directory > > include/mysystem.h:81:21: netdb.h: No such file or directory > > include/mysystem.h:82:26: sys/socket.h: No such file or directory > > include/mysystem.h:83:26: netinet/in.h: No such file or directory > > include/mysystem.h:84:27: netinet/tcp.h: No such file or directory > > This is working just the way it's supposed to. I don't think you fully > understand what the -mno-cygwin flag means. Cygwin provides the > unix/posix emulation layer, things like the berkeley sockets API and > pthreads[*] that you are missing above. When you use -mno-cygwin, you > are using a completely different compiler. Mingw has no emulation > layer, that's the "minimalist" part. When you use mingw, you get a > standard C runtime library (provided by MSVCRT, i.e. Windows), the bare > win32 API, and not much else. No berkeley sockets. No pthreads. None > of the stuff that Cygwin provides. > > -mno-cygwin does not just "make things that doesn't depend on the cygwin > DLL", it removes Cygwin from the equation entirely. I did understand that. If I understand you correctly, one can not use Mingw from inside cygwin to produce working code that uses sockets and pthreads. Is that correct? This code does use sockets and pthreads although I do not strictly need them as it is code that uses them to run in parallel and I only want to run on one processor. Oh well, I can still use it in cygwin. Thanks for your help. Brian. > Brian > > [*] Yes I know of projects like pthreads-win32. But that's neither > Cygwin nor mingw, really. > > --godpcjfpnnceejebejnh > Content-Type: message/rfc822; > name="cygwin.107248" > Content-Disposition: attachment; > filename="cygwin.107248" -- Brian Salter-Duke (Brian Duke) b_duke AT octa4 DOT net DOT au Post: 626 Melbourne Rd, Spotswood, VIC, 3015, Australia Phone 03-93992847. http://members.iinet.net.au/~linden1/brian/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/