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: Basic porting question


"Sven N. Thommesen" <sthomme@humsci.auburn.edu> writes:
> Forgive a newbie's question -- but I've just been made aware of the
> existence of gnu-win32, and I'd like to find out exactly what I can and
> cannot do with it. So:
> 
> (1) given that I have an application currently running under Linux, can I:
> (a) compile it under Linux with gnu-win32 libraries and produce a Win32
> executable, or must I:
> (b) move my source code to Win95 or WinNT, and compile it there ?

Can do both. I typically never build anything on win32 box, but rather
use a cross-compiler on a linux box. The only time I run into trouble
is when a configure script is not properly configured (;-) for cross
compilation; in that case, I run the configure on a '95 box (mine mounts
my linux disk using Samba, so no copying needed), and then I run make
on the linux box (I had to do it in the case of Octave, a Matlab "clone"). 

gcc et al run an order of magnitude faster under linux than under '95
on the same Ppro box.

> 
> (2) the application is written in Objective-C -- is this part of gcc
> supported?

ObjC is included in the binary distribution and builds fine from source, 
but I don't know if it actually works sine I don't use it myself. 
Hopefully someone else will follow up and provide more useful info.

> 
> (3) the application uses not only Tcl but also Tk and BLT. Will the need
> for Tk and BLT present a problem for a porting project?
> 

Tcl/tk/blt etc does not build under gnu-win32. What is supplied are the
stubs to load the Tcl and Tk DLLs built with Borland (also MSVC++?).

I assume you're building extended tcl/tk/blt interpreters, right? If so,
only the trivial ones will work in the current setup. For most part, if
you allocate the memory and Tcl deallocates it (TCL_DYNAMIC), then the
chances of your code crashing is quite high. Something to do with malloc
et al incompatibility. There was some talk about a patch to BC++ 5.0x,
but never heard more about it.

If your code uses TCL_STATIC or TCL_VOLATILE *always*, chances are things
will work just fine. You'll have to build the BLT stub yourself, but you
can follow the way Cygnus has done it for tcl/tk. 

For one of my projects, I have to build the GUI using native compiler
(BC++ 5.01), and the rest using gnu-win32.

> (4) is the linux dependence on X 'magically' transformed into Win32 GUI
> calls, or are X libraries required?
> 

Nope. X code requires X libraries. Period. You can of course use the X
libraries ported to gnu-win32. Works with b18 with Sergey's patches.
See ftp://niteroi.gsfc.nasa.gov/pub/win32/X11R6.3 for more info.

> 
> Sven Thommesen
> Auburn University
> 

Regards,
Mumit -- khan@xraylith.wisc.edu
http://www.xraylith.wisc.edu/~khan/
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


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