www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - GDC: how to link with alternate version of Phobos?

reply "H. S. Teoh" <hsteoh quickfur.ath.cx> writes:
I'm trying to test if a bug has been fixed in the latest Phobos git
repository, but I'm having trouble convincing gdc to *not* use the
default installation of Phobos. What option do I need on the commandline
to tell it to use a different path to Phobos? -I only appends include
paths *after* the default paths, so it'll always pick up the default
installation first (plus it will cause import conflicts since there will
be two modules claiming to be std.stdio).


T

-- 
Too many people have open minds but closed eyes.
Feb 23 2012
parent reply Johannes Pfau <nospam example.com> writes:
Am Thu, 23 Feb 2012 20:21:57 -0800
schrieb "H. S. Teoh" <hsteoh quickfur.ath.cx>:

 I'm trying to test if a bug has been fixed in the latest Phobos git
 repository, but I'm having trouble convincing gdc to *not* use the
 default installation of Phobos. What option do I need on the
 commandline to tell it to use a different path to Phobos? -I only
 appends include paths *after* the default paths, so it'll always pick
 up the default installation first (plus it will cause import
 conflicts since there will be two modules claiming to be std.stdio).
 
 
 T
 
try -nophoboslib and/or -nostdinc. However, to use the git phobos version with gdc you also have to compile it with gdc. I'm not sure but I think the phobos source in gdc has gdc specific changes, at least it's that way for druntime.
Feb 24 2012
parent "Jonathan M Davis" <jmdavisProg gmx.com> writes:
On Friday, February 24, 2012 09:43:30 Johannes Pfau wrote:
 try -nophoboslib and/or -nostdinc. However, to use the git phobos
 version with gdc you also have to compile it with gdc. I'm not sure but
 I think the phobos source in gdc has gdc specific changes, at least it's
 that way for druntime.
That's necessary and expected for druntime. Each compiler is going to have its own version of druntime, so you _need_ GDC's version of druntime. However, at least in theory, Phobos should be the same across compilers. I don't know what GDC is currently doing though. Regardless, if you're using another version of Phobos, you're going to need to build it against GDC's version of druntime. - Jonathan M Davis
Feb 24 2012