Re: interface



Nathan Wijnia <nahwynia@xxxxxxxxxxx> schrieb:
I would like create software with visual c++ for read and write
electronics board (medical instruments).

I strongly recommend using a free compiler (e.g. GCC) and developing
under a unix-like environment. Otherwise you won't be able to write
portable code.

Writing portable code has nothing to do with the operating system or
compiler you are using; portable C++ code conforms to the C++ standard and
can be compiled by any C++ compiler which implements the C++ standard,

That's true, but the only way to be sure is to try different standard
conforming compilers. To my experience, there were always some bad
surprises when compiling and running an application on a different
platform. There are many subtle differences.

That having said, if you want to use only one compiler, GCC is a very
good choice. Even if you are accidently using compiler specific features
(which happens quickly), your program would at leastl be portable to all
GCC platforms. If that happens with a MSVC project, you're tied to
Windows.

independent of which operating system you are using.

Portable code needs portable libraries. The C++ standard specifies only
the base libraries. No graphical output, no graphical user interfaces,
and strictly speaking it doesn't even specify the access to the file system,
let alone RS232 communication and similar.

Even when you are developing under Windows, you might
want to take a look at MSYS/DevC++ or Cygwin. It's also generally a
good idea to use a portable GUI-toolkit such as GTK, Qt or wxWidgets.
Don't mess around with the Windows API.

GUI toolkit? As far as I know the original poster wants to write code to
communicate with electronic devices.

Yes, so it might be just a command line tool. The OP didn't tell us,
so his application might need a GUI as well. Even if it doesn't, what
about the communication to the hardware? Please, show me the C++ standard
that deals with serial port, parallel port or USB.

Besides, using portable toolkits is
only of interest if you want to have your applications running on different
operating systems.

Yes, and I always found that kind of freedom valuable. That's why I
recommended it.

Even if you're working only on one platform, splitting the code in
platform-dependent and platform-independent code is still a good idea
and increases readability. And portable libraries help you there. Some
of them give you a simpler interface than the operating system, so they
save work even when used on only one platform.

If it is meant to run on Windows only, then using Visual
C++ its libraries is fine and maybe even better, since they are especially
developed for Windows applications.

If the application is really, really "Windows only", I agree.

But I doubt that there is really something like a "Windows only
application". Let's take another example from the medical field: Osirix.
It's a very good (and free) application that runs only on Mac OSX. Why
does it run only there? Because noone wants to run Osirix on another,
cheaper hardware with Windows or FreeBSD or whatever? No, it's because
Macs are very common there, and everyone who wants to run Osirix takes
a Mac for that task. The minority that don't have a Mac are forced to
buy one, or they have to use an alternative to Osirix, which might be
even more expensive than buying a Mac.


Greets,

Volker

--
Volker Grabsch
---<<(())>>---
Administrator
NotJustHosting GbR
.



Relevant Pages

  • Re: interface
    ... I strongly recommend using a free compiler and developing ... Writing portable code has nothing to do with the operating system or ... Don't mess around with the Windows API. ... Even if you're working only on one platform, ...
    (comp.programming)
  • Re: What is the benefit to me of .NET as an end-user?
    ... Even in Windows, there are multiple platforms. ... vs Win CE (a subset of Win32). ... Also, most would consider the browser a different platform than Win32, ... compiler converts it to native machine instructions. ...
    (borland.public.delphi.non-technical)
  • Re: Introducing the Intel(R) Fortran Compiler, Standard and Professional Editions, for Mac OS*
    ... That would encourage Intel Fortran users on one ... platform and just charge for the compiler. ... The Language Reference manual for Windows and for MaxOsX sure look ...
    (comp.lang.fortran)
  • Re: To VICE users...monitor?
    ... or some external monitor such as VICMON or SUPERMON? ... Commodore 64 cross-compiler on my Windows Xp Machine: ... platform like the c64 you have to know the platform *very* well to come up ... - where are those cool programs written using said compiler, ...
    (comp.sys.cbm)
  • Re: Settle a Bet
    ... with a Linux compiler, or it could be compiled to run in ... with a Windows compiler. ... platform will understand. ...
    (comp.lang.c)