Thread overview
Can not link with Object?
Jul 24, 2002
OddesE
Jul 25, 2002
OddesE
Jul 26, 2002
Walter
Jul 26, 2002
OddesE
Jul 30, 2002
Walter
Jul 31, 2002
OddesE
Aug 01, 2002
Walter
Aug 01, 2002
OddesE
Aug 02, 2002
Walter
July 24, 2002
Could you take a look at the example
file below, post.d?


---------- post.d ---------

class MyException
{
}

int main()
{
   return 0;
}


I am not able to compile it? As
long as I don't use classes I don't
get any trouble. I tried changing
the include path in sc.ini, but then
it says file object.d not found...


---------- sc.ini ----------

[Version]
version=7.51 Build 020

[Environment]
LIB="%@P%\..\lib";\dm\lib
DFLAGS="-I%@P%\..\src\phobos"


--------- command ----------

D:\Programs\DigitalMars\dmd\bin>dmd post.d
link post,,,user32+kernel32/noi;
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

post.obj(post)
 Error 42: Symbol Undefined _Dobject_Object_eq_FC6ObjectZi
--- errorlevel 1


What am I doing wrong?
Is Object.eq() undefined?

--
Stijn
OddesE_XYZ@hotmail.com
http://OddesE.cjb.net
_________________________________________________
Remove _XYZ from my address when replying by mail


July 25, 2002
Anyone?

--
Stijn
OddesE_XYZ@hotmail.com
http://OddesE.cjb.net
_________________________________________________
Remove _XYZ from my address when replying by mail



July 26, 2002
It compiles and links fine when I do it. I suggest the library, phobos.lib, is not on the LIB path.

"OddesE" <OddesE_XYZ@hotmail.com> wrote in message news:ahmpc3$7nr$1@digitaldaemon.com...
> Could you take a look at the example
> file below, post.d?
>
>
> ---------- post.d ---------
>
> class MyException
> {
> }
>
> int main()
> {
>    return 0;
> }
>
>
> I am not able to compile it? As
> long as I don't use classes I don't
> get any trouble. I tried changing
> the include path in sc.ini, but then
> it says file object.d not found...
>
>
> ---------- sc.ini ----------
>
> [Version]
> version=7.51 Build 020
>
> [Environment]
> LIB="%@P%\..\lib";\dm\lib
> DFLAGS="-I%@P%\..\src\phobos"
>
>
> --------- command ----------
>
> D:\Programs\DigitalMars\dmd\bin>dmd post.d
> link post,,,user32+kernel32/noi;
> OPTLINK (R) for Win32  Release 7.50B1
> Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved
>
> post.obj(post)
>  Error 42: Symbol Undefined _Dobject_Object_eq_FC6ObjectZi
> --- errorlevel 1
>
>
> What am I doing wrong?
> Is Object.eq() undefined?
>
> --
> Stijn
> OddesE_XYZ@hotmail.com
> http://OddesE.cjb.net
> _________________________________________________
> Remove _XYZ from my address when replying by mail
>
>


July 26, 2002
"Walter" <walter@digitalmars.com> wrote in message news:ahqhvm$1b53$1@digitaldaemon.com...
> It compiles and links fine when I do it. I suggest the library,
phobos.lib,
> is not on the LIB path.
>


Mmm....
I tried setting the LIB= path in sc.ini to
relative as well as absolute paths and I set
the LIB environment variable to the correct
absolute directory... All to no avail.

In the end I just copied phobos.lib into the
same dir as dmd.exe, that is, dmd\bin\, and
then it worked.... I can't figure out what
I am doing wrong.

Maybe you think it is possible to make dmd.exe
print the path is is looking in? That may help
locate these kind of problems.


--
Stijn
OddesE_XYZ@hotmail.com
http://OddesE.cjb.net
_________________________________________________
Remove _XYZ from my address when replying by mail



July 30, 2002
"OddesE" <OddesE_XYZ@hotmail.com> wrote in message news:ahsaao$82d$1@digitaldaemon.com...
> "Walter" <walter@digitalmars.com> wrote in message news:ahqhvm$1b53$1@digitaldaemon.com...
> > It compiles and links fine when I do it. I suggest the library,
> phobos.lib,
> > is not on the LIB path.
> >
>
>
> Mmm....
> I tried setting the LIB= path in sc.ini to
> relative as well as absolute paths and I set
> the LIB environment variable to the correct
> absolute directory... All to no avail.
>
> In the end I just copied phobos.lib into the
> same dir as dmd.exe, that is, dmd\bin\, and
> then it worked.... I can't figure out what
> I am doing wrong.
>
> Maybe you think it is possible to make dmd.exe
> print the path is is looking in? That may help
> locate these kind of problems.

It's the linker looking at the LIB environment setting. Try this:
    set LIB=\dmd\lib;\dm\lib



July 31, 2002
"Walter" <walter@digitalmars.com> wrote in message news:ai76ug$1i17$1@digitaldaemon.com...
>
> It's the linker looking at the LIB environment setting. Try this:
>     set LIB=\dmd\lib;\dm\lib
>

I really don't get it, because I think that the LIB path does point at the right directory. Check my output below:


D:\Programs\DigitalMars\dmd\lib>dir phobos.lib
 Volume in drive D is Program
 Volume Serial Number is 48DC-A2C1

 Directory of D:\Programs\DigitalMars\dmd\lib

03-06-2002  01:20              399.872 phobos.lib
               1 File(s)        399.872 bytes
               0 Dir(s)   7.414.575.104 bytes free

D:\Programs\DigitalMars\dmd\lib>cd ..\bin

D:\Programs\DigitalMars\dmd\bin>type sc.ini
[Version]
version=7.51 Build 020

[Environment] LIB=D:\Programs\DigitalMars\dmd\lib;D:\Programs\DigitalMars\dm\lib DFLAGS="-I%@P%\..\src\phobos"


D:\Programs\DigitalMars\dmd\bin>dmd post
link post,,,user32+kernel32/noi;
OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

post.obj(post)
 Error 42: Symbol Undefined _Dobject_Object_eq_FC6ObjectZi
--- errorlevel 1


As you can see from the output, phobos.lib is located in
D:\Programs\DigitalMars\dmd\lib
and the LIB environment setting in sc.ini is set to:
LIB=D:\Programs\DigitalMars\dmd\lib;D:\Programs\DigitalMars\dm\lib

What am I doing wrong?


--
Stijn
OddesE_XYZ@hotmail.com
http://OddesE.cjb.net
_________________________________________________
Remove _XYZ from my address when replying by mail




August 01, 2002
Try copying phobos.lib into your current directory.

"OddesE" <OddesE_XYZ@hotmail.com> wrote in message news:ai86c9$4uq$1@digitaldaemon.com...
> "Walter" <walter@digitalmars.com> wrote in message news:ai76ug$1i17$1@digitaldaemon.com...
> >
> > It's the linker looking at the LIB environment setting. Try this:
> >     set LIB=\dmd\lib;\dm\lib
> >
>
> I really don't get it, because I think that the LIB path does point at the right directory. Check my output below:
>
>
> D:\Programs\DigitalMars\dmd\lib>dir phobos.lib
>  Volume in drive D is Program
>  Volume Serial Number is 48DC-A2C1
>
>  Directory of D:\Programs\DigitalMars\dmd\lib
>
> 03-06-2002  01:20              399.872 phobos.lib
>                1 File(s)        399.872 bytes
>                0 Dir(s)   7.414.575.104 bytes free
>
> D:\Programs\DigitalMars\dmd\lib>cd ..\bin
>
> D:\Programs\DigitalMars\dmd\bin>type sc.ini
> [Version]
> version=7.51 Build 020
>
> [Environment] LIB=D:\Programs\DigitalMars\dmd\lib;D:\Programs\DigitalMars\dm\lib DFLAGS="-I%@P%\..\src\phobos"
>
>
> D:\Programs\DigitalMars\dmd\bin>dmd post
> link post,,,user32+kernel32/noi;
> OPTLINK (R) for Win32  Release 7.50B1
> Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved
>
> post.obj(post)
>  Error 42: Symbol Undefined _Dobject_Object_eq_FC6ObjectZi
> --- errorlevel 1
>
>
> As you can see from the output, phobos.lib is located in
> D:\Programs\DigitalMars\dmd\lib
> and the LIB environment setting in sc.ini is set to:
> LIB=D:\Programs\DigitalMars\dmd\lib;D:\Programs\DigitalMars\dm\lib
>
> What am I doing wrong?
>
>
> --
> Stijn
> OddesE_XYZ@hotmail.com
> http://OddesE.cjb.net
> _________________________________________________
> Remove _XYZ from my address when replying by mail
>
>
>
>


August 01, 2002
That works, but it isn't practical... :(


"Walter" <walter@digitalmars.com> wrote in message news:aic1nf$3k1$1@digitaldaemon.com...
> Try copying phobos.lib into your current directory.
>
> "OddesE" <OddesE_XYZ@hotmail.com> wrote in message news:ai86c9$4uq$1@digitaldaemon.com...
> > "Walter" <walter@digitalmars.com> wrote in message news:ai76ug$1i17$1@digitaldaemon.com...
> > >
> > > It's the linker looking at the LIB environment setting. Try this:
> > >     set LIB=\dmd\lib;\dm\lib
> > >
> >
> > I really don't get it, because I think that the LIB path does point at the right directory. Check my output below:
> >
> >
> > D:\Programs\DigitalMars\dmd\lib>dir phobos.lib
> >  Volume in drive D is Program
> >  Volume Serial Number is 48DC-A2C1
> >
> >  Directory of D:\Programs\DigitalMars\dmd\lib
> >
> > 03-06-2002  01:20              399.872 phobos.lib
> >                1 File(s)        399.872 bytes
> >                0 Dir(s)   7.414.575.104 bytes free
> >
> > D:\Programs\DigitalMars\dmd\lib>cd ..\bin
> >
> > D:\Programs\DigitalMars\dmd\bin>type sc.ini
> > [Version]
> > version=7.51 Build 020
> >
> > [Environment] LIB=D:\Programs\DigitalMars\dmd\lib;D:\Programs\DigitalMars\dm\lib DFLAGS="-I%@P%\..\src\phobos"
> >
> >
> > D:\Programs\DigitalMars\dmd\bin>dmd post
> > link post,,,user32+kernel32/noi;
> > OPTLINK (R) for Win32  Release 7.50B1
> > Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved
> >
> > post.obj(post)
> >  Error 42: Symbol Undefined _Dobject_Object_eq_FC6ObjectZi
> > --- errorlevel 1
> >
> >
> > As you can see from the output, phobos.lib is located in
> > D:\Programs\DigitalMars\dmd\lib
> > and the LIB environment setting in sc.ini is set to:
> > LIB=D:\Programs\DigitalMars\dmd\lib;D:\Programs\DigitalMars\dm\lib
> >
> > What am I doing wrong?
> >
> >
> > --
> > Stijn
> > OddesE_XYZ@hotmail.com
> > http://OddesE.cjb.net
> > _________________________________________________
> > Remove _XYZ from my address when replying by mail
> >
> >
> >
> >
>
>


August 02, 2002
"OddesE" <OddesE_XYZ@hotmail.com> wrote in message news:aicd3v$h2r$1@digitaldaemon.com...
> That works, but it isn't practical... :(

Ok, but it does prove there is nothing wrong with the library itself. Next, try setting the LIB environment variable.