digitalmars.D.learn - Module & Symbol Undefined Problem
- Josh (37/37) Aug 29 2009 Hi,
- Josh (2/2) Aug 29 2009 Jeez. I forgot to add my compile command, here is it:
- Ary Borenszweig (3/6) Aug 29 2009 I think you have to pass it the other files too:
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!
Aug 29 2009
Jeez. I forgot to add my compile command, here is it: dfl -release -gui maindialog.d
Aug 29 2009
Josh escribió:Jeez. I forgot to add my compile command, here is it: dfl -release -gui maindialog.dI think you have to pass it the other files too: dfl -release -gui maindialog.d common/globals.d (etc.)
Aug 29 2009