Not able to load classes defined in archive file in Mac OSX using Object.factory

Adam D. Ruppe destructionator at gmail.com
Fri Nov 16 14:28:22 UTC 2018


On Friday, 16 November 2018 at 14:24:10 UTC, Aditya wrote:
> ./ss/Stat.d  (defines interface named 'Stat')
> ./ss/Min.d   (defines class named 'Min' that implements Stat)

Did you put a module declaration at the top of those files? Like

module ss.Stat;


That ought to be required; the compiler lets you skip it, but it 
doesn't work reliably without it once you start importing the 
module or other similar things.



But once you have that, the name of your class will be the full 
name with module, so like if min has

module ss.Min;

class Min {}


the full class name will be

ss.Min.Min

the full module name dot the full class name.


More information about the Digitalmars-d-learn mailing list