This is the mail archive of the cygwin@sourceware.cygnus.com 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]

RE: -mno-cygwin: STATUS_STACK_OVERFLOW before main


On Tue, 01 Feb 2000 12:47:52 -0300, salvador <salvador at inti dot gov dot ar> wrote:

> I have an application that compiles fine using Mingw32. When I 
> try to compile it using Cygwin B20.1 (adding -mno-cygwin and
> -lmingw32 -lcrtdll) I get an executable, but it dies before 
> reaching main with an STATUS_STACK_OVERFLOW error.
>
>  I tried with --stack XXXX without luck (same crash in same 
> place).
>...

Check your include and link paths. Your supposed mingw32 app is obviously not one.

A cygwin installation can easily get confused about a mingw32 target because some #define or library reference may be accidentally resolved against the cygwin include/library files which may follow the mingw32 ones in the search paths. This is almost certainly the problem here. Is your program C++ or C - I have seen this with C++ in the past ?

There is some confusion (for me at least) about which files are usable in both targets - those for the Windows OS (.h and lib*.a) ought to be OK.

I guess the appropriate resolution of this is for the -mno-cygwin specs to select a different set of paths and use -nostdinc (and the ld equivalent) or similar to avoid picking up cygwin stuff from well-known locations like /usr/include - or to be sure that you don't put cygwin stuff in any of these places.

-- 
Dirk Fieldhouse                 Logica UK Limited
fieldhouse@logica.com           75 Hampstead Road
c=gb;a=attmail;p=logica;        London NW1 2PL
o=LOGICA;ou1=UK;s=fieldhouse    UK
+44 (20) 7637 9111
- not speaking for Logica

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


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