I was trying to program a little program in D, but I keep getting linking errors (although I don't use external libraries). The exact error message is Error 42: Symbol Undefined _D4main4mainFAAyaZv6clientMFZC6client6Client. My code is
interface Component
{
public:
string GetIdentifier();
void Activate(JSONValue data);
}
class SomeComponent : Component
{
public:
string GetIdentifier()
{
return "SomeComponent";
}
void Activate(JSONValue data)
{
writeln("Something");
}
}
class Client
{
public:
Component[] components;
void register(Component c)
{
components ~= c;
writeln(c.GetIdentifier());
}
}
void main(string[] args)
{
Client client();
SomeComponent d;
client.register(d);
}