Re: GCC/Linux to produce exe files for Windows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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.

Hi Brian,

thanks a lot. I'll take a look at the Cygwin list.

In the mean time, though, I would like to build the program on Linux
and configure GCC to produce an .exe for Windows.
As said, the program doesn't call any Windows API, therefore, I hope,
it should be a matter of choosing the right GCC options, right?

Enrico




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux