[Discussion] Watcom Compiler
Dave Yeo
daveryeo at telus.net
Mon Jan 18 00:53:13 PST 2010
On Sun, 17 Jan 2010 23:19:20 -0800 (PST), Thomas Clayton wrote:
>Dave,
>
>You _might_ want to explain "cross-compiling" to Brian (and other 'listeners' who might like to learn a little about "make"ing ;-) programs).
Yes I was wondering about explaining more.
Cross-compiling is compiling for another system, one example is
compiling Windows code from OS/2. It is also possible to compile to a
completely different CPU architecture eg compiling an ARM program from
OS/2 (I don't think OpenWatcom supports this yet). Testing can be a
problem with cross-compiling as the program will only run on the target
system usually. Exceptions are things like running the Windows program
under Odin or in the case of Linux under WINE.
>
>I _do_ remember reading in the BYTE advert.s that Watcom could compile for 16-bit (DOS), 16-bit protected-mode (Win and OS/2), and 32-bit (Win9x and OS/"2").
Yes OpenWatcom supports 16bit and 32bit DOS, WIndows, and OS/2, also in
both 16bit and 32bit versions, as well as Linux, QNX and netware. The
Linux support is not finished.
>
>Also - and this one I'm not sure of - you said "pick the target at the
>beginning". Did you mean at [installation] or at [the beginning of a "project(?)"] or at [the beginning of a compilation]?
At the beginning of starting a project, after launching the IDE and
choosing a new project you get a choice of targets including 16 bit or
32 bit WIN and OS/2 programs and DLLs.
>
>"Project"s are what Borland calls - IF I remember correctly - all the code that goes together to make an app.. Various portions of which can be reused for other projects - even if they're _not_ "whole objects".
Yes the code, resources, help files and also the compilation options.
Best is to download OpenWatcom and install it. Then play around with it
including creating a simple project, perhaps the old standby "Hello
World"
#include <stdio.h>
int main()
{
printf("hello, world");
return 0;
}
Then compiling it to an executable and running it.
The Getting Started help file has a good tutorial.
Dave
>
>
>Thomas Clayton
>
>
>--- On Sun, 1/17/10, Dave Yeo <daveryeo at telus.net> wrote:
>
>> From: Dave Yeo <daveryeo at telus.net>
>> Subject: Re: [Discussion] Watcom Compiler
>> To: "POSSI Discussion List" <discussion at lists.possi.org>
>> Date: Sunday, January 17, 2010, 7:54 PM
>> On Sun, 17 Jan 2010 17:18:18 -0500
>> (EST), Brian Grawburg wrote:
>>
>> >I'm going to teach myself C++ and use the Open Watcom
>> compiler. Can code I write in OS/2 also be compiled in
>> the Watcom WIndows
>> >compiler? That is, if I write a program in OS/2
>> and compile it, then copy the code to a Windows machine and
>> compile it again, will it
>> >work? My ultimate goal is to write C++ code for
>> robotic applications which will, I'm sorry to say, use
>> WIndows.
>>
>> Sure, OpenWatcom also supports cross-compiling as well so
>> you can
>> compile your Windows code on OS/2 and just copy the binary
>> over. If
>> using the IDE you just have to pick the target at the
>> beginning.
>> Dave
>>
>>
>> _______________________________________________
>> Discussion mailing list
>> Discussion at lists.possi.org
>> http://lists.possi.org/mailman/listinfo/discussion
>>
>_______________________________________________
>Discussion mailing list
>Discussion at lists.possi.org
>http://lists.possi.org/mailman/listinfo/discussion
More information about the Discussion
mailing list