This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: GCC/Linux to produce exe files for Windows
- From: Brian Dessent <brian at dessent dot net>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 15 Feb 2006 05:08:04 -0800
- Subject: Re: GCC/Linux to produce exe files for Windows
- References: <43F325D6.3000401@fatti.com>
Enrico Migliore wrote:
> Actually, I got a Linux application and would like to build it
> for Windows. The application is pure C and makes use of quite
> a few libraries that Windows doesn't have, like popt and so on.
>
> I already built the application with Cygwin but when I ran it,
> within Cygwin, I got a segmentation fault signal, which DDD says,
> it is issued by a pthread function.
>
> That's why I'm trying to see if GCC can build direclty the .exe format,
> from within Linux.
The generated code won't matter one bit whether it was a native gcc or a
cross gcc. So switching from native to cross isn't going to have any
effect on your problem. And in general, segmentation faults are never
the fault of the compiler, they indicate a problem with the code itself.
You may also be thinking of the cygwin / mingw distinction, but that is
completely separate and orthogonal to native / cross.
If you're referring to a fault in pthread_key_create, then please read
the cygwin mailing list archives, as what you are likely seeing is not
an actual fault at all, and you need to continue past it when debugging.
If your problem is with Cygwin then you should consider posting on the
cygwin list.
Brian