Using static d libs in C++

BCS ao at pathlink.com
Sat Sep 29 08:43:01 PDT 2007


Reply to Chrono,

> Hi Mike,
> 
> thank you for your help.
> 
> now I tried:
> 
> gcc main.o sub.o -o myprogram -m32 -lstdc++ -Xlinker -L/root/dmd/lib
> -lphobos -lpthread -lm
> 
> /root/dmd that's the original dmd linux package.
> 
[...]

try: wc /root/dmd/lib/libphobos.a
this will fail if the current user cant read the file (as they shouldn't 
if your not running as root, and if you are running as root, shame on you)

If your not sure where to put stuff, I have an install script that works 
most of the time here

http://svn.dsource.org/projects/scrapple/trunk/scripts/dmd_update

be warned it will attempt to download dmd.zip from the web, so if that is 
a problem (either you want a different version or you don't want to burn 
the bandwidth again) you will want to tweak it. Either way there are a few 
option at the top you might want to twiddle a bit (it attempt to save off 
old copies of everything for instance) 

And I just noticed I might be missing a few things, if you try it, please 
tell me how well it worked.




More information about the Digitalmars-d-learn mailing list