April 08, 2004 Module Woes | ||||
---|---|---|---|---|
| ||||
I'm having a problem. I have the following files: ========mtest.d=========== module mtest; int c; static this() { c = 3; } int add(int x, int y) { return x + y; } void compile(char[] pattern, char[] attributes) { } ===========add.d============ import mtest; int main() { int a = add(1, 2); return 0; } when I compile it, I get this in the console: D:\dmd\test>..\bin\dmd add.d D:\dmd\bin\..\..\dm\bin\link.exe add,,,user32+kernel32/noi; OPTLINK (R) for Win32 Release 7.50B1 Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved add.obj(add) Error 42: Symbol Undefined _D5mtest3addFiiZi --- errorlevel 1 it doesn't matter what symbols I'm using, it always comes up as Error 42: Symbol Undefined if it's from a module. Does anyone have any insights? Thanks -Deja |
Copyright © 1999-2021 by the D Language Foundation