www.digitalmars.com         C & C++   DMDScript  

D - Linker Error

I've got a really simple set of classes, and I'm getting linker errors that I
can't seem to figure out. It makes me feel like I'm in 3rd grade again.

The details are below. Does anybody have any ideas?

-- Benji Smith

 This code is in xmlparser.d



import xmldocumentfactory; void main (char[][] args) { XmlDocumentFactory xml = new XmlDocumentFactory(); }
 And this code is in xmldocumentfactory.d



import string; import regexp; import c.stdio; class XmlDocumentFactory { private char[][] lex; private char[] inputString = "<node1><node2></node2></node1>"; this() { lex = splitStringByBracketGroups(inputString); for (int i = 0; i < lex.length; i++) { printf(lex[i][] ~ "\n"); } } private char[][] splitStringByBracketGroups(char[] source) { // RegExp switches g & m are used for global & multiline matches RegExp bracketSplit = new RegExp("[<>]","gm"); return bracketSplit.split(source); } }
 When I compile, I get the following errors from the linker:



xmlparser.obj(xmlparser) Error 42: Symbol Undefined __Class_XmlDocumentFactory xmlparser.obj(xmlparser) Error 42: Symbol Undefined_Dxmldocumentfactory_XmlDocumentFactory__ctor_FZC18XmlDocumentFactory
Feb 27 2003