Sometime between v6.1 and v6.4, SMC began generating the context class name differently (and incorrectly) for C++ targets. The C++ manual section says the context name will be <AppClass>Context. That is, for
%class Hep, the generated name should be
class HepContext. This was the previous behavior.
Now SMC instead generates the context class name from the <smc_file_name_stem>. That is, if the input file is named dist_hep.sm, the context name will be
class dist_hepContext. At least according to the manual, and certainly with respect to historical behavior, this is incorrect. Only the generated output file names should reflect the input filename, not the classes within those files.
Consistent with this, if the input filename is changed to Hep.sm, the context class will be named
class HepContext. If a lowercase name is used, hep.sm, the generated context is
class hepContext. (At least under Linux, where filenames are case-sensitive. I don't know the behavior under Windows. In any case, the class name should probably not reflect file system naming peculiarities.)
Log in to post a comment.