Groups > Palm OS > Palm developers forum > Re: Link error




Re: Link error

Re: Link error
Wed, 14 May 2008 00:45:52 +100
On 13/05/2008, at 1:28 PM, Vivian Chen wrote:
> I've search from Google that -mno-cygwin mean to use mingw to  
> compile not cygwin. And -nostdlib means not to use standard library.
>
> The second one is easily to be understood. But I'm quite confused  
> to the first one.
>
> My library is compiled by gcc. What's the difference between mingw  
> and cygwin?

You have a Cygwin-based GCC. The -mno-cygwin lets it work like the  
MinGW compiler. This means you will not have the cygwin.dll  
dependency but it also means you won't have POSIX APIs, only what  
Windows gives you (ANSI C).

> If not choose -mno-cygwin, when I debug it , it would use Cygwin1.dll?

No.

> Another thing, if I link without -mno-cygwin, it would works well  
> in a PNO project (at least can startup).
>
> But if do, it would not startup in a Protein project.
>
> It would appear an error says "SIGSEGV signal availabel:  
> segmentation fault"
>
> What's the problem?

SIGSEGV signal ... is that meant to be "unavailable"?

ANSI C has only a few signals (though SIGSEGV is one of them). If the  
hosting process (simulator) is using Cygwin and your code is not, the  
definition of SIGSEGV (and other, more important things) may be  
different. Try linking your Protein project to Cygwin.

-- 
Link


Post Reply
about | contact