Thread overview | |||||
---|---|---|---|---|---|
|
August 30, 2009 Module & Symbol Undefined Problem | ||||
---|---|---|---|---|
| ||||
Hi, I wanted to give D a try today and port one of my applications to it. I am currently stuck on this problem: I have the following 3 files: maindialog.d - contains the main() function & form creation(using dfl and Entice Designer) private { import dfl.all; import common.Globals; } Globals.d - contains a public class. module common.Globals; import network.LoginNetwork; public class Globals { public static NetworkInterface Network = new NetworkInterface(); } LoginNetwork.d module network.LoginNetwork; import std.socket; class NetworkInterface { public void doSomething() { // add ltr code } } I want to be able to call Globals.Network.doSomething() from the form class(when i click a button), but whenever I try to, I get the following error: - in the form "mainDialog" class, when i click a button. void InitializeNetwork(Object o, EventArgs ev) { Globals.Network.doSomething(); } maindialog.obj(maindialog) Error 42: Symbol Undefined _D6common7Globals7Globals7NetworkC7network12LoginNet work16NetworkInterface --- errorlevel 1 Hope someone can help me, Thanks! |
August 30, 2009 Re: Module & Symbol Undefined Problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Josh | Jeez. I forgot to add my compile command, here is it: dfl -release -gui maindialog.d |
August 30, 2009 Re: Module & Symbol Undefined Problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Josh | Josh escribió:
> Jeez. I forgot to add my compile command, here is it:
>
> dfl -release -gui maindialog.d
I think you have to pass it the other files too:
dfl -release -gui maindialog.d common/globals.d (etc.)
|
Copyright © 1999-2021 by the D Language Foundation