This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Using -mno-cygwin flag


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@octa4.net.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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]