|
| Re: Link error |
 |
Wed, 14 May 2008 09:32:23 +080 |
To Lincoln:
Thanks. I really know very little about the cygwin.
How to link project to the cygwin? I think I have. Must I choose -mno-cygwin? If
I choose, I get a "undefined reference to" error.
As you said, if I want to use POSIX APIs, I must do it. And If I won't, I
needn't. Is it right?
But I don't know which functions used in the library. Maybe they are defined in
POSIX APIs.
If I want to link with -mno-cygwin, and won't get a "undefined reference
to" error, how can I do?
Can you tell me?
Thanks again. ^^
2008-05-14
Vivian Chen
·¢¼þÈË£º Lincoln Ramsay
·¢ËÍʱ¼ä£º 2008-05-13 22:48:00
ÊÕ¼þÈË£º Palm Developer Forum
³ËÍ£º
Ö÷Ì⣺ Re: Link error
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
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/
|
| Post Reply
|
|
|
|
|
|
|
|
|
|