D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Portable programming

 

Simon Williams wrote:
> 
> Virtually any program I write I will want to work anywhere regardless of 
> OS or architecture.

Good luck ;)

> Does anyone have any recommendations for libraries to use for portable 
> programs?
> 
> The main thing I am looking at for now is a widget set- should I use 
> gtk, qt or something else?

Define everywhere?

If you want to get low end mobile phones you are basically committed to
going Java, as some won't let anything else in, which gets you a lot of
platforms, but not everywhere.

If you want Desktop, and bigger embedded devices you might get away with
GTK+ and friends. Neil W can probably advise on embedded stuff.

If you are focused on Desktop, WxWidgets gives you a pretty broad MFC
like API, so I'm told. Definitely does the Microsoft Win32, GNU/Linux,
MacOSX, various others...

> I'm thinking SDL for other graphics unless someone knows of anything 
> better. Does SDL have widgets?

SDL is more a drawing layer from what I understand. It has mostly been
used for gaming (which isn't a bad thing), but I don't think standard
widget like stuff is a big thing for most game programmers, you can
probably get a zillion pac-man sprite libraries which work well, but
struggle to get more business orientated code. That said if the kind of
interface many games has is good enough, SDL runs on a lot of stuff (and
is dead small, so can be ported to new stuff if absolutely needed).

> What about sound? file I/O? Networking?

I think you need to be more specific. What sort of programs?

There are a whole load of networking libraries and APIs, the Java 1.4
stuff supports nonblocking I/O, and stuff like that, essential API calls
if you want to build big robust peer to peer networks, but overkill if
you just want to GET and POST small amounts of data over HTTP say.

Similarly there is sound support "can beep on error", or sound support
that lets you mix incoming voice channels, independent of whether the
sound card supports hardware mixing or not. Without knowing what you are
writing, hard to recommend any.

Then there is programmer expertise. The SDL lot tend to take the view
that, it can't be that hard to write "insert hideously complex
programming thing", and writing it from scratch for their own need will
fit in less RAM and make it run faster, others prefer to stand on the
shoulders of taller folk.

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html