Thread overview | |||||
---|---|---|---|---|---|
|
June 21, 2004 Looking for some help with an import problem | ||||
---|---|---|---|---|
| ||||
This may be some dumb mistake on my part, but I'm getting the following error below when trying to pull in / merge in "mystdstring.d" into "findinivalue.d." I'd be thankful if someone would please point out what I'm doing wrong? Currently I'm using the dmd root directory (I do plan to make another path later...just testing a few things first), and compiling with the following line: "C:\dmd>bin\dmd findinivalue.d" (and "mystdstring.d" is located in the dmd root). If I copy and paste mystdstring.d into findinivalue.d everything compiles, links, and runs just fine. Help! Thxs in advance for any replys. :) <linker_error> findinivalue.obj (findinivalue) Error 42: Symbol Undefined _D11mystdstring5ifindFAaZi --- errorlevel 1 </linker_error> # ----- findinivalue.d ----- # # import std.string; # private import mystdstring; # # char[] FindINIValue # ( # in char[] sINIBuf, # in char[] sSection, # in char[] sKey = "", # in char[] sDefault = "" # ) # { # int ips = 0; # # ... # # ips = ifind( sINIBuf, sSection ); # # } # # ----- mystdstring.d ------ # # module mystdstring; # # import std.string; # # int ifind # ( # in char[] s, # in char[] sub # ) # { # ... # } ------------------------------------------------------------------- "Dare to reach for the Stars...Dare to Dream, Build, and Achieve!" |
June 21, 2004 Re: Looking for some help with an import problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to David L. Davis | It works for me. D:\D\src>dmd findinivalue.d mystdstring.d main.d d:\D\dmd\bin\..\..\dm\bin\link.exe findinivalue+mystdstring+main,,,user32+kernel 32/noi; I think you're forgetting to specify all the files in the compile and/or link? Regan. On Mon, 21 Jun 2004 20:55:51 +0000 (UTC), David L. Davis <SpottedTiger@yahoo.com> wrote: > This may be some dumb mistake on my part, but I'm getting the following error > below when trying to pull in / merge in "mystdstring.d" into "findinivalue.d." > I'd be thankful if someone would please point out what I'm doing wrong? > Currently I'm using the dmd root directory (I do plan to make another path > later...just testing a few things first), and compiling with the following line: > "C:\dmd>bin\dmd findinivalue.d" (and "mystdstring.d" is located in the dmd > root). If I copy and paste mystdstring.d into findinivalue.d everything > compiles, links, and runs just fine. Help! > > Thxs in advance for any replys. :) > > <linker_error> > > findinivalue.obj (findinivalue) > Error 42: Symbol Undefined _D11mystdstring5ifindFAaZi > --- errorlevel 1 > > </linker_error> > > # ----- findinivalue.d ----- > # > # import std.string; > # private import mystdstring; > # > # char[] FindINIValue > # ( > # in char[] sINIBuf, > # in char[] sSection, > # in char[] sKey = "", > # in char[] sDefault = "" > # ) > # { > # int ips = 0; > # > # ... > # > # ips = ifind( sINIBuf, sSection ); > # > # } > # > # ----- mystdstring.d ------ > # > # module mystdstring; > # > # import std.string; > # > # int ifind > # ( > # in char[] s, > # in char[] sub > # ) > # { > # ... > # } > > ------------------------------------------------------------------- > "Dare to reach for the Stars...Dare to Dream, Build, and Achieve!" -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ |
June 21, 2004 Re: Looking for some help with an import problem | ||||
---|---|---|---|---|
| ||||
Posted in reply to Regan Heath | Regan Heath: Doh! Thxs, with your post I now see my dumb mistake...I didn't add all the .d files on the commandline as you did. Once I added both "findinivalue.d" and "mystdstring.d" on the commandline, everything complies, links and runs again. Somehow I thought that importing "mystdstring.d" into "findinivalue.d" was like doing an include in "C", and thus everything would've complied and linked. But I was wrong. Thxs again for the help! :)) >In article <opr9yshdfv5a2sq9@digitalmars.com>, Regan Heath says... > >It works for me. > >D:\D\src>dmd findinivalue.d mystdstring.d main.d >d:\D\dmd\bin\..\..\dm\bin\link.exe >findinivalue+mystdstring+main,,,user32+kernel >32/noi; > >I think you're forgetting to specify all the files in the compile and/or link? > >Regan. > >On Mon, 21 Jun 2004 20:55:51 +0000 (UTC), David L. Davis <SpottedTiger@yahoo.com> wrote: > >> This may be some dumb mistake on my part, but I'm getting the following >> error >> below when trying to pull in / merge in "mystdstring.d" into >> "findinivalue.d." >> I'd be thankful if someone would please point out what I'm doing wrong? >> Currently I'm using the dmd root directory (I do plan to make another >> path >> later...just testing a few things first), and compiling with the >> following line: >> "C:\dmd>bin\dmd findinivalue.d" (and "mystdstring.d" is located in the >> dmd >> root). If I copy and paste mystdstring.d into findinivalue.d everything >> compiles, links, and runs just fine. Help! >> >> Thxs in advance for any replys. :) >> >> <linker_error> >> >> findinivalue.obj (findinivalue) >> Error 42: Symbol Undefined _D11mystdstring5ifindFAaZi >> --- errorlevel 1 >> >> </linker_error> >> >> # ----- findinivalue.d ----- >> # >> # import std.string; >> # private import mystdstring; >> # >> # char[] FindINIValue >> # ( >> # in char[] sINIBuf, >> # in char[] sSection, >> # in char[] sKey = "", >> # in char[] sDefault = "" >> # ) >> # { >> # int ips = 0; >> # >> # ... >> # >> # ips = ifind( sINIBuf, sSection ); >> # >> # } >> # >> # ----- mystdstring.d ------ >> # >> # module mystdstring; >> # >> # import std.string; >> # >> # int ifind >> # ( >> # in char[] s, >> # in char[] sub >> # ) >> # { >> # ... >> # } >> >> ------------------------------------------------------------------- >> "Dare to reach for the Stars...Dare to Dream, Build, and Achieve!" > >-- >Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ ------------------------------------------------------------------- "Dare to reach for the Stars...Dare to Dream, Build, and Achieve!" |
Copyright © 1999-2021 by the D Language Foundation