D - Linker Errors
- Benji Smith (34/39) Feb 27 2003 xmlparser.obj(xmlparser)
- Mike Wynn (16/55) Feb 27 2003 dmd does not search for obj (as javac does for class and java files when
- Benji Smith (1/1) Feb 28 2003 Thanks.
I'm having some linker errors that I can't seem to track down. My code is below. Let me know if you have any ideas.xmlparser.obj(xmlparser) Error 42: Symbol Undefined __Class_XmlDocumentFactory xmlparser.obj(xmlparser) Error 42: Symbol Undefined _Dxmldocumentfactory_XmlDocumentFactory__ctor_FZC18XmlDocumentFactoryThe errors that I get from the linker are:DMD=\dmd\bin\dmd DFLAGS= $(DMD) xmlparser.d $(DFLAGS) xmlparser del xmlparser.obj xmlparser.exeThe shell script I'm using to compile my files is:import xmldocumentfactory; void main (char[][] args) { XmlDocumentFactory xml = new XmlDocumentFactory(); }The xmlparser.d file contains this simple little main function: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); } }And, the xmldocumentfactory.d file contains this class:Any help?
Feb 27 2003
dmd does not search for obj (as javac does for class and java files when compiling). you need to do dmd xmlparser.d xmldocumentfactory.d or dmd -c xmlparser.d dmd -c xmldocumentfactory.d dmd xmlparser.obj xmldocumentfactory.obj or dmd -c xmldocumentfactory.d dmd xmlparser.d xmldocumentfactory.obj or ..... make a .lib with the xml doc factory etc or use link not dmd to link or (I'm sure you get the picture). "Benji Smith" <Benji_member pathlink.com> wrote in message news:b3m0hv$1os1$1 digitaldaemon.com...I'm having some linker errors that I can't seem to track down. My code isbelow.Let me know if you have any ideas.xmlparser.obj(xmlparser) Error 42: Symbol Undefined __Class_XmlDocumentFactory xmlparser.obj(xmlparser) Error 42: Symbol Undefined _Dxmldocumentfactory_XmlDocumentFactory__ctor_FZC18XmlDocumentFactoryThe errors that I get from the linker are:DMD=\dmd\bin\dmd DFLAGS= $(DMD) xmlparser.d $(DFLAGS) xmlparser del xmlparser.obj xmlparser.exeThe shell script I'm using to compile my files is:import xmldocumentfactory; void main (char[][] args) { XmlDocumentFactory xml = new XmlDocumentFactory(); }The xmlparser.d file contains this simple little main function: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); } }And, the xmldocumentfactory.d file contains this class:Any help?
Feb 27 2003