What is a good setup for cross platform development?

S

sandwich_eater

I am looking for a Linux distribution and a standard C++ compiler (IDE
not too important) that can also compile to Win32, to run on my Dell
dimension 2400... I have trouble with new distros since installing a
USB 2 card. I am wondering if it is better to get a new machine and
dedicate it to Linux and C++ development and deal with cross platform
issues later, alternatively use something like Borland C++ on Windows.
 
W

White Wolf

I am looking for a Linux distribution and a standard C++ compiler (IDE
not too important) that can also compile to Win32, to run on my Dell
dimension 2400... I have trouble with new distros since installing a
USB 2 card. I am wondering if it is better to get a new machine and
dedicate it to Linux and C++ development and deal with cross platform
issues later, alternatively use something like Borland C++ on Windows.

Well, I had no trouble with USB under Linux at all. As for corss platform
development... I would use gcc, as it is cross platform really. MinGW if
you boot to Windows, and the native one on Linux. On Windows you can also
use Cygwin, but that is a "99% Unix/1% Windows incompatibilities" thing.
Not bad, but the programs you compile in it mat need it to run (like the X
server part of it).
 
D

Donovan Rebbechi

I am looking for a Linux distribution and a standard C++ compiler
(IDE not too important) that can also compile to Win32, to run on my
Dell dimension 2400...

Forget about it. Instead, write mostly portable code, and keep the
non-portable parts isolated in small modules, and use compile-time
tests (ifdef for example) to deal with it.
installing a USB 2 card. I am wondering if it is better to get a
new machine and dedicate it to Linux and C++ development and deal
with cross platform issues later,

Yes, that works fine, more or less. As long as you mostly stick to
standard code, and understand when you are using operating system
functionality, as opposed to standard C++, the issues should be easy
to address when they come up. Portability may also affect certain
decisions you make -- for example, if you want to code portably, you
can't make your code tightly coupled with non-portable libraries. So
you'd choose portable over non-portable libraries (e.g. MFC is a
non-starter. So is Motif.)
alternatively use something like Borland C++ on Windows.

If you like. Again, this shouldn't be too hard if you code with
portability in mind in the first place.

Cheers,
 
B

benben

I am looking for a Linux distribution and a standard C++ compiler (IDE
not too important) that can also compile to Win32, to run on my Dell
dimension 2400... I have trouble with new distros since installing a
USB 2 card. I am wondering if it is better to get a new machine and
dedicate it to Linux and C++ development and deal with cross platform
issues later, alternatively use something like Borland C++ on Windows.

Not a good idea...You may consider having two machines (or dual boot on one
machine if your harddisk doesn't complain), one running windows and the
other running linux, both powered by a set of development tools and
documentations alike, and copy you portable portion of code in two machines.

Usually, it is often better to have another machine for source code
management (version control, backup etc.)

ben
 
L

Lionel B

In reference to standards and gcc, I am put off by what P.J. Plauger
says ...
http://groups.google.co.uk/group/co...60210/ae9b0fbb24d6fdc5?hl=en#ae9b0fbb24d6fdc5

Wouldn't worry too much about that... gcc is *very* widely used, is the de facto standard compiler for Linux and is
about as cross-platform as it gets (eg. MinGW port for Win32). Recent versions compare reasonably well in terms of
standards compliance with other modern C and C++ compilers.

P. J. Plauger made some cogent observations about C/C++ standard library issues, but I didn't read that post as singling
out gcc for special criticism. Any other choice of compiler is likely to ship with standard libraries subject to the
same issues and will almost certainly be less cross-platform as regards both architecture and OS. And, of course, you
will still have the choice to deploy third-party standard libraries - such as P. J. Plauger's own Dinkumware libs :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top