digitalmars.D - need help with linker error
- glen <glen_member pathlink.com> Apr 11 2005
- "Joey Peters" <squirrel nidhogg.com> Apr 11 2005
- Glen <Glen_member pathlink.com> Apr 11 2005
- J C Calvarese <jcc7 cox.net> Apr 11 2005
Hi All,
Just starting with D. I am getting the following link error on the follow 2
simple file program. Any help is appreciated :-)
regards,
-Glen
D:\dev\D\dmd\bin\..\..\dm\bin\link.exe hello,,,user32+kernel32/noi;
OPTLINK (R) for Win32 Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved
hello.obj(hello)
Error 42: Symbol Undefined __Class_4file4File
hello.obj(hello)
Error 42: Symbol Undefined _D4file4File5_ctorFAaZC4file4File
--- errorlevel 2
------------------ hello.d ------------------------
import file;
int main(char[][] args)
{
File file = new File( "." );
return 0;
}
------------------ file.d ------------------------
module file;
public class File {
public {
this(char[] path) {
}
}
}
Apr 11 2005
Are you sure you're compiling both files? (dmd hello.d file.d) "glen" <glen_member pathlink.com> schreef in bericht news:d3ec6a$313u$1 digitaldaemon.com...Hi All, Just starting with D. I am getting the following link error on the follow 2 simple file program. Any help is appreciated :-) regards, -Glen D:\dev\D\dmd\bin\..\..\dm\bin\link.exe hello,,,user32+kernel32/noi; OPTLINK (R) for Win32 Release 7.50B1 Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved hello.obj(hello) Error 42: Symbol Undefined __Class_4file4File hello.obj(hello) Error 42: Symbol Undefined _D4file4File5_ctorFAaZC4file4File --- errorlevel 2 ------------------ hello.d ------------------------ import file; int main(char[][] args) { File file = new File( "." ); return 0; } ------------------ file.d ------------------------ module file; public class File { public { this(char[] path) { } } }
Apr 11 2005
Thanks that was it (duh)... One of those errors I will never make again (I will chalk that up to being a java developer for 6 years)!!! and thanks to J C Calvares too... In article <d3edsr$1kl$1 digitaldaemon.com>, Joey Peters says...Are you sure you're compiling both files? (dmd hello.d file.d) "glen" <glen_member pathlink.com> schreef in bericht news:d3ec6a$313u$1 digitaldaemon.com...Hi All, Just starting with D. I am getting the following link error on the follow 2 simple file program. Any help is appreciated :-) regards, -Glen D:\dev\D\dmd\bin\..\..\dm\bin\link.exe hello,,,user32+kernel32/noi; OPTLINK (R) for Win32 Release 7.50B1 Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved hello.obj(hello) Error 42: Symbol Undefined __Class_4file4File hello.obj(hello) Error 42: Symbol Undefined _D4file4File5_ctorFAaZC4file4File --- errorlevel 2 ------------------ hello.d ------------------------ import file; int main(char[][] args) { File file = new File( "." ); return 0; } ------------------ file.d ------------------------ module file; public class File { public { this(char[] path) { } } }
Apr 11 2005
In article <d3ec6a$313u$1 digitaldaemon.com>, glen says...Hi All, Just starting with D. I am getting the following link error on the follow 2 simple file program. Any help is appreciated :-) regards, -Glen
Add both source files to the command line: dmd hello.d file.d More info: http://www.prowiki.org/wiki4d/wiki.cgi?ErrorMessages#LinkerErrorsD:\dev\D\dmd\bin\..\..\dm\bin\link.exe hello,,,user32+kernel32/noi; OPTLINK (R) for Win32 Release 7.50B1 Copyright (C) Digital Mars 1989 - 2001 All Rights Reserved hello.obj(hello) Error 42: Symbol Undefined __Class_4file4File hello.obj(hello) Error 42: Symbol Undefined _D4file4File5_ctorFAaZC4file4File --- errorlevel 2 ------------------ hello.d ------------------------ import file;
..------------------ file.d ------------------------ module file;
.. jcc7
Apr 11 2005









Glen <Glen_member pathlink.com> 