March 01, 2014
On 01/03/14 23:35, Martin Nowak wrote:
> What are the actual gcc arguments?

Thanks for the advice here -- I appreciate it :-)

> For me running
>
> ../dmd/src/dmd -m64 -I../druntime/import -I../phobos
> -L-L../phobos/generated/linux/release/64  -w -v -ofgenerated/linux/64/dget
> generated/linux/64/dget.o 2>/dev/null | grep '\-Xlinker'
>
> prints
>
> gcc generated/linux/64/dget.o -o generated/linux/64/dget -m64
> -L../phobos/generated/linux/release/64 -L/usr/lib64 -Xlinker --export-dynamic
> -l:libphobos2.a -lpthread -lm -lrt.

For me:

$ ../dmd/src/dmd -m64 -I../druntime/import -I../phobos -L-L../phobos/generated/linux/release/64  -w -v -ofgenerated/linux/64/dget generated/linux/64/dget.o
binary    ../dmd/src/dmd
version   v2.065-devel-0d01545
config    /etc/dmd.conf
gcc generated/linux/64/dget.o -o generated/linux/64/dget -m64 -L../phobos/generated/linux/release/64 -l:libphobos2.a -lpthread -lm -lrt

If I try literally using the statement you posted, I get no output at all.

> Also check wheter the dget.o object has a D main.
>
> nm generated/linux/64/changed.o | grep _Dmain
>
> 0000000000000000 T _Dmain

$ nm generated/linux/64/dget.o | grep _Dmain
0000000000000000 T _Dmain
                 U _Dmain


March 01, 2014
On 02/03/14 00:07, Joseph Rushton Wakeling wrote:
> config    /etc/dmd.conf

This is interesting.  My system doesn't have an /etc/dmd.conf file: I always place dmd.conf in the same directory as the dmd binary.

Could it be that people not seeing my linker errors are doing so because the tools build is picking up on flags in an /etc/dmd.conf introduced with an earlier install?

Next ›   Last »
1 2