digitalmars.D - Weird Linking Issue
- John Demme (63/63) Feb 14 2005 I've not been having a good coupla of days... All these issues I haven't...
I've not been having a good coupla of days... All these issues I haven't been able to figure out. Well, this one's a linking one. I'm running DMD 0.113 on Linux. Here's GCC's output: ----------------------------------------- gcc -o nnEngine src/com/neuralnexus/nnengineserver.o -L. -L/home/teqdruid/workspace/nnClient/d -L/home/teqdruid/workspace/nnStore -L/home/teqdruid/workspace/mango -lnnengine -lnnstore -lnnclientd -lmango -ldl -lphobos -lpthread src/com/neuralnexus/nnengineserver.o(.gnu.linkonce.t_Dmain+0x5e): In function `_Dmain': : undefined reference to `_D3com11neuralnexus8nnengine7nodeweb5nodesS3com11neuralnexus8nnengine7nodeweb5Nodes' src/com/neuralnexus/nnengineserver.o(.gnu.linkonce.t_Dmain+0x8a): In function `_Dmain': : undefined reference to `_D3com11neuralnexus8nnengine7nodeweb5nodesS3com11neuralnexus8nnengine7nodeweb5Nodes' ./libnnengine.a(server.o)(.gnu.linkonce.t_D3com11neuralnexus8nnengine6xmlrpc6server9NNServlet10 ecodeTestFZv+0x5a): In function `_D3com11neuralnexus8nnengine6xmlrpc6server9NNServlet10decodeTestFZv': : undefined reference to `_D3com11neuralnexus8nnengine6xmlrpc6server9NNServlet10decodeTest5nodesS3com11neuralnexus8nnengine7nodeweb5Nodes' ./libnnengine.a(server.o)(.gnu.linkonce.t_D3com11neuralnexus8nnengine6xmlrpc6server9NNServlet10 ecodeTestFZv+0xde): In function `_D3com11neuralnexus8nnengine6xmlrpc6server9NNServlet10decodeTestFZv': : undefined reference to `_D3com11neuralnexus8nnengine6xmlrpc6server9NNServlet10decodeTest5nodesS3com11neuralnexus8nnengine7nodeweb5Nodes' ./libnnengine.a(server.o)(.gnu.linkonce.t_D3com11neuralnexus8nnengine6xmlrpc6server9NNServlet16decodeNodeStructFC5mango3xml3rpc7Objects10MethodCallYAC3com11neuralnexus8nnengine7nodew b9nnWebNode+0x19c): In function `_D3com11neuralnexus8nnengine6xmlrpc6server9NNServlet16decodeNodeStructFC5mango3xml3rpc7Objects10MethodCallYAC3com11neuralnexus8nnengine7nodeweb9nnWebNode': : undefined reference to `_D3com11neuralnexus8nnengine6xmlrpc6server9NNServlet10decodeTest5nodesS3com11neuralnexus8nnengine7nodeweb5Nodes' ./libnnengine.a(server.o)(.gnu.linkonce.t_D3com11neuralnexus8nnengine6xmlrpc6server9NNServlet10xNodeParamFC5mango3xml3rpc7Objects10MethodCalliZAC3com11neuralnexus8nnengine7nodew b9nnWebNode+0x102): In function `_D3com11neuralnexus8nnengine6xmlrpc6server9NNServlet10xNodeParamFC5mango3xml3rpc7Objects10MethodCalliZAC3com11neuralnexus8nnengine7nodeweb9nnWebNode': : undefined reference to `_D3com11neuralnexus8nnengine6xmlrpc6server9NNServlet10decodeTest5nodesS3com11neuralnexus8nnengine7nodeweb5Nodes' ./libnnengine.a(server.o)(.gnu.linkonce.t_D3com11neuralnexus8nnengine6xmlrpc6server9NNServlet18setNodeDataHandlerFC5mango3xml3rpc7Objects10MethodCallZC5mango3xml3rpc7Objects14M thodResponse+0xc1): In function `_D3com11neuralnexus8nnengine6xmlrpc6server9NNServlet18setNodeDataHandlerFC5mango3xml3rpc7Objects10MethodCallZC5mango3xml3rpc7Objects14MethodResponse': : undefined reference to `_D3com11neuralnexus8nnengine6xmlrpc6server9NNServlet10decodeTest5nodesS3com11neuralnexus8nnengine7nodeweb5Nodes' collect2: ld returned 1 exit status ----------------------------------------- Now, GCC appears to be right. Those symbols don't exist. In fact, I ran those symbols through the demangler that I found on the dsource bindings project, and it can't make heads or tails of them. What are they? Where is DMD getting them from? My only guess is that this is related to the "Weird Compile Error" I was having, wherein DMD gave me this error: src/com/neuralnexus/nnengine/nodeweb.d(436): function com.neuralnexus.nnengine.nodeweb.nnWebNode.getImmediateChildren cannot access frame of function __funclit9 Until I changed the line: public Nodes nodes; to: public static Nodes nodes; Wherein Nodes is a struct. This feels like a compiler bug, but I'll be damned if I can figure out TIA John I have this inkling feeling that DMD was once a C compiler, and it's treating the static attribute as if this was C.
Feb 14 2005