xiaotom wrote:
I want my software to be independant of operation system and databases.
I would do this with wxWidgets. It is a cross-platform library, which
allows you to build native looking GUI (when compiled on Windows, it
looks like a Windows program, when compiled on Linux, it looks like a
Linux program etc.) and use databases via ODBC and a lot more:
http://www.wxwindows.org/
3.Once I chose odbc, does that mean that whatever kind of database I
would use later, I don't have to change my source code?
No, it doesn't guarantee it. The reason for this is that even if you
write your queries using ANSI SQL, there are still some databases that
don't fully support it. The less functions you use and the more basic
queries you write the better are changes that no changes are required.
But using ODBC is pretty much best you can do for this purpose.
4. now I program on window xp platform. If I use odbc, when impliment
my program to a unix platform, do i have to rewrite my code?
If you use wxWidgets or other cross-platform library and no external
single platform functions, no. If you use MFC or other single platform
library, then yes. But some attention should be put for the compiler
also, as some compilers allow you to write code that is not portable and
it will give you some trouble when trying to compile with different
compiler. Gcc is propably most used cross-platform compiler.
If you deside to use wxWidgets with gcc it might be easier to use some
IDE, which has wxWidgets library and the compiler with it. Some
alternatives are:
# Quite mature, Freeware, not open source, has basic features and some
minor bugs. But server often "Bandwidth Limit Exceeded" state:
http://www.parinyasoft.com/
# Quite mature, open source, but comes currently with quite old version
of wxWidgets. But you can compile the wxWidgets by yourself if you so
deside:
http://www.codeblocks.org/
# Young project, open source, doesn't have debugger and lacks on some
other features also, but has latest version of wxWidgets library. Only
for Windows currently:
http://ossdevstudio.finngerd.net/