I just started reading Petzold's WinAPI32. My experience so far is that I'm going to get a lot of warnings compiling C programs in Dev-C++ with pedantic set to on. But, if I have it off I miss those warningings and I sometimes think can be good if I could figure out what they are saying. But most times I can't.
But mainly I'm wondering if I should be using wxDev-C++ instead? Is that going to involve a complete uninstall and clean install? And what are the advantages?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2007-09-26
-pedantic is not the only warning setting you might use to improve your code quality, and it is as it suggests 'pedantic'. You should set -Wall -Werror -Wformat (the last one is only useful if using stdio formatted i/o - printf, scanf etc.). Those settings will issue all the most critical warnings, and behave as if they are errors. In C I'd recommend also -Wshadow, but in C++ it is likely to cause more trouble than it is worth.
Dev-C++ is OK for Petzold, wxDev-C++ supports Visual GUI design and a GUI class library. Petzold has nothing to say about such things!
Note that Petzold is written with the expectation that Microsoft's compiler is used. For GCC you should check out http://www.computersciencelab.com/Petzold.htm it has makefiles for the programs, and lists issues with the example code that may require modifications.
Clifford
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You will need to do a clean uninstall of your standard Dev-C++ if you
want to use wxdev safely.
The big advantage in my mind is that wxdev has been undergoing continued
development. It would not be unexpected at some point in the not so
distant future to see the code bases merge in fact.
That being said, I don't see any big advantage in terms of having
warnings and errors presented in any clearer fashion.
I would encourage you to play with wxdev, if you like it, use it,
if not, you can always go back. There are several other good
MinGW IDE's out there. You can for example have side-by-side
installations of CodeBuilder and Dev, or MinGW Developer Studio
and Dev.
Wayne
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Petzold's book is wonderful for learning SDK style Windows programming. Its how I and many others learned this. If you stick with it you'll really learn it well. While I havn't compiled very many of Petzold's programs with Dev C++, I have compiled some, and I expect most or all would compile OK.
Fred
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I just started reading Petzold's WinAPI32. My experience so far is that I'm going to get a lot of warnings compiling C programs in Dev-C++ with pedantic set to on. But, if I have it off I miss those warningings and I sometimes think can be good if I could figure out what they are saying. But most times I can't.
But mainly I'm wondering if I should be using wxDev-C++ instead? Is that going to involve a complete uninstall and clean install? And what are the advantages?
-pedantic is not the only warning setting you might use to improve your code quality, and it is as it suggests 'pedantic'. You should set -Wall -Werror -Wformat (the last one is only useful if using stdio formatted i/o - printf, scanf etc.). Those settings will issue all the most critical warnings, and behave as if they are errors. In C I'd recommend also -Wshadow, but in C++ it is likely to cause more trouble than it is worth.
For a full list of the warning options see: http://gcc.gnu.org/onlinedocs/gcc-3.4.6/gcc/Warning-Options.html#Warning-Options
Dev-C++ is OK for Petzold, wxDev-C++ supports Visual GUI design and a GUI class library. Petzold has nothing to say about such things!
Note that Petzold is written with the expectation that Microsoft's compiler is used. For GCC you should check out http://www.computersciencelab.com/Petzold.htm it has makefiles for the programs, and lists issues with the example code that may require modifications.
Clifford
You will need to do a clean uninstall of your standard Dev-C++ if you
want to use wxdev safely.
The big advantage in my mind is that wxdev has been undergoing continued
development. It would not be unexpected at some point in the not so
distant future to see the code bases merge in fact.
That being said, I don't see any big advantage in terms of having
warnings and errors presented in any clearer fashion.
I would encourage you to play with wxdev, if you like it, use it,
if not, you can always go back. There are several other good
MinGW IDE's out there. You can for example have side-by-side
installations of CodeBuilder and Dev, or MinGW Developer Studio
and Dev.
Wayne
Petzold's book is wonderful for learning SDK style Windows programming. Its how I and many others learned this. If you stick with it you'll really learn it well. While I havn't compiled very many of Petzold's programs with Dev C++, I have compiled some, and I expect most or all would compile OK.
Fred