Thread overview | ||||||
---|---|---|---|---|---|---|
|
April 11, 2005 need help with linker error | ||||
---|---|---|---|---|
| ||||
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) { } } } |
April 11, 2005 Re: need help with linker error | ||||
---|---|---|---|---|
| ||||
Posted in reply to glen | 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) { > } > } > > } > > > > |
April 11, 2005 Re: need help with linker error | ||||
---|---|---|---|---|
| ||||
Posted in reply to glen | 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#LinkerErrors >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; .. > >------------------ file.d ------------------------ > > >module file; > .. jcc7 |
April 11, 2005 Re: need help with linker error | ||||
---|---|---|---|---|
| ||||
Posted in reply to Joey Peters | 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) { >> } >> } >> >> } >> >> >> >> > > |
Copyright © 1999-2021 by the D Language Foundation