Compiling and Project Notes
This page details some information that may be helpful if you are having problems compiling SmaugWiz. The items are in no particular order, and will be added as I see a need (mainly due to receiving questions on an issue).
More help - Wincrypt.h - Undefined externs - SmaugWiz.hpj
Compilers:
SmaugWizard is designed to be compiled and built using Microsoft Visual C++. It will not compile or link with any other brand of compiler (such as Borland or a *nix compiler), and converting it to be usable with a different compiler would be a HUGE job. If you feel like undertaking such a project, you are welcome to do so, but I cannot offer any help due to my limited time and my lack of experience with other compilers.
SmaugWiz has been successfully compiled with version 4.2 through version 6.0 of VC++. I use version 6.0 for development, and that is the compile environment for which you can expect the least problems.
SmaugWiz is a MFC (Microsoft Foundation Classes) project, and makes significant use of the MFC library, so learning MFC will help you understand the program.
If the information on this site does not help you with a problem you are having, feel free to email me with questions. I try to answer promptly, but I receive and read an average of 200 email messages a day, so sometimes I get a bit backlogged, or messages just get lost in the inbasket for a while. I prefer that questions about problems getting SmaugWiz to compile with stock code be sent to me directly, rather than spamming the Smaug list with them.
Q: I'm using VC++ version 4.2. SmaugWiz compiles OK, but when I try to link I get a lot of undefined external errors. How can I fix this:
A: Version 4.2 does not properly pick up all the information from the newer version project files. For some reason it seems to ignore a number of the source .cpp files in the project. The fix is to go into the VC++ menu that is titled something like "Add files to project", select all source files in the SmaugWiz source directory, and tell it to add them. This will force it to pick up the missing files and build them.
Q: I am getting an error about a missing file, wincrypt.h. Where is it?
A: Depending upon how you installed VC++ you may not have wincrypt.h. But it is not actually used, and the include of it has been removed from the latest version. Just go into crypt.cpp, and remove the line that includes wincrypt.h.
Q: I get an error trying to compile SmaugWiz.hpj. What's wrong?
A: SmaugWiz.hpj contains an include path for the MFC file "afxhelp.hm", and the path specified does not automatically get corrected when the environment changes. There are two scenarios which can cause problems. The first is when a VC++ version 5 or earlier project (SmaugWiz 2.00 or earlier) is used by VC++ version 6. Version 6 is installed in a different directory than 5.0, and it does not covert the path in the .hpj file when it converts the project. You can fix it by editing the 3rd from last line in SmaugWiz.hpj which points to the file afxhelp.hm. You need to change the path. If you had version 5 installed in the default location, and if you have version 6 in the default location then you would change the line from:
#include ..\..\..\..\Program
Files\DevStudio\VC\MFC\include\afxhelp.hm
to:
#include ..\..\..\..\Program Files\Microsoft Visual
Studio\VC98\MFC\include\afxhelp.hm
If you have not installed VC++ in the Microsoft default location then you will have to adjust the path accordingly.
The second scenario is if you are compiling SmaugWiz on a different drive than where you have VC++ installed. In that case you will need to use the exact path instead of a relative one. For instance if you are compiling on drive E, but VC++ is installed on drive C, you would then need to change the above line to:
#include C:\Program Files\Microsoft Visual Studio\VC98\MFC\include\afxhelp.hm
But it is not necessary to compile the help files (unless you are trying to modify them), because you can just use the help files that come with the download. (We are talking here about the windows help files, not the online help.) You can avoid the problem by telling VC++ not to compile SmaugWiz.hpj. To do that, from the view menu, open the workspace window, select the FileView tab and expand the Source Files folder. Right click on the file SmaugWiz.hpj and then click 'properties' on the pop-up menu. Under the 'general' tab, check the item "Exclude file from build". Then make sure that the supplied SmaugWiz.hlp and SmaugWiz.cnt files are in the SmaugRoot/system directory.