Advantages and disadvantages of Open Watcom

Since it was recommended to try to support several (in this case, C / C ++) compilers in a post in StackOverflow, if possible, as this forces you to encode more standard compatibility and helps to find errors.

So, I was looking for additional free C / C ++ compilers. I could add support for my project (written in C / C ++ (both languages ​​combined)). I found Open Watcom an interesting candidate.

So my question is: what are the advantages and disadvantages of the Open Watcom C / C ++ compiler compared to others (e.g. gcc / g ++, Visual C ++, etc.)?

+8
c ++ c compiler-construction watcom
source share
6 answers

There are probably no particular advantages, because if portable code is your goal, you will usually try to limit your code to the standard subset implemented by all compilers. I would say that the lowest common denominator, but may seem somewhat derogatory.

The advantages of one compiler over another usually lie in the extensions it provides, in the libraries that it includes, or in the performance of the generated code, if your portability is your goal, you probably are not interested either. These are not the advantages of one compiler over another that should be of interest to you in this case, but rather its compliance and compliance with ISO standards.

In its earlier commercial incarnation, Watcom was famous for being one of the best optimizing compilers; I doubt, however, that he has kept up with the development of the processor since (or even switching for 16 bits to 32 bits x86!).

Its only function, which can be seen as an advantage in some cases, is that it supports DOS, OS / 2, and Windows, but this is probably only an advantage if the goal is to maintain legacy systems. Efforts to port it to Linux and BSD and non-x86 processors exist, but are not complete, and GCC has been around for many years.

I would suggest that if you can support GCC and VC ++, you probably have sufficient compiler independence (but it is recommended that you compile with high-level warning settings ( -Wall -Werror in GCC and \W4 \Wx in VC ++ ). I believe that compiler portability is a trivial issue compared to OS portability, and what you really need to consider is cross-platform library support, not code-independent code support.

If, however, playing with compilers is your thing, also consider the Digital Mars compiler. Like Watcom, it also has a commercial compiler legacy being a Zortech / Symantec C / C ++ compiler in a previous life.

+6
source share

Something in favor is if your “hackor” is the fact that you can define outside the usual calling conventions using #pragma aux . Other than that, I see no reason to even try to use such a dated compiler unless you had terrible hardware limitations. Imo, there are only 3 to worry about, GCC, ICC and MSVC

+5
source share

Some people use expressions related to the Watcom compiler (actually OpenWatcom), which is "deprecated." So what does this mean?

  • This may mean that it does not implement the latest C standard. How many "not dated" compilers do?
  • This may mean that it does not provide a framework, since this is primarily an environment for C and ForTran, and somewhere far away, C ++, which I can not judge.
  • This may mean that it cannot generate excellent build code from the garbage code C.
  • This may mean that it does not support x64 development.
  • This may mean that the debugger is rudimentary and supports debugging assembly.

Now, what does he do - besides supporting 16-bit real and protected mode:

  • It produces an excellent 32-bit protected mode flat-memory code model used for the Win32 environment.
  • Its code generation capabilities are excellent, and they are up there with more "not dated" compilers.
  • Easily configure multi-threaded code with your profiler.

How do you feel the compiler? I do not know how to do that. How are error messages recorded? Is this in console log messages?

The world's largest network operating system - Novell Netware - had Watcom as its development environment. That says a lot about Watcom. And so no one will forget: Netware died due to poor marketing management combined with a failed game in Redmond. He did not die from a lack of technological excellence.

I guess I'm trying to say that you guys who don't know what you're talking about should be slightly less likely to write the answers.

I know that I know all about getting these coveted points and badges and what you have. And how you get them doesn't matter, right?

+5
source share

The Open Watcom compiler is somewhat outdated and it feels. It is based on what has long been a good compiler for creating MS DOS games. Currently, it does not comply with the standard and its standard library is in an immature state.

I would prefer more modern and popular compilers like Intel cc, g ++, VC ++ or CLang. Not sure about Borland C, haven't tried this for a long time.

+4
source share

Benefits:

  • is free
  • it is open source. You can change it and its runtime libraries as you like.
  • it is cross-platform. You can run it, among other platforms, on Windows and Linux. Moreover, you can create programs with it for different platforms using one platform.

Disadvantages:

  • it is outdated a little, but not like in the past
+4
source share
Positive (2)
  • Code and projects are not bloated, like projects in Microsoft Visual Studio / C ++ (not hundreds of vproj and other files and folders). You can simply create a makefile, as in GCC (which is better understood than Visual Projects Makefiles ...)
  • Even the installation does not take much time (on x64 Win 7), in comparison with 2 ++ GBytes Visual Project ...
  • Compared to GCC, it might seem better to handle
negative
  • Missing Clib: strn ... functions (strndup, strncmpi, etc.), getoptlong
  • ARM Support (@ July 1, 2015)
  • As an editor, you really should use Notepad ++, not an internal editor
+1
source share

Source: https://habr.com/ru/post/650411/


All Articles