Instructions for compilation from multiple source files

Solomon E via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Nov 10 05:29:02 PST 2014


On Monday, 10 November 2014 at 13:11:45 UTC, Russel Winder via
Digitalmars-d-learn wrote:
> ketmar was just being a teensy weensy bit over-dramatic.
>
> He was trying to point out that gdc is part of the GCC and so 
> all the
> GCC documentation is relevant for gdc. D thus gets huge amounts 
> of
> documentation for gdc for free.

The problem that I'm having with this seems to be with GDC, not
the rest of the D community. The following is a quote of the
entire amount of information in the GDC man page on the following
compiler options and file extensions:

SYNOPSIS
         gdc [-c]
             [-g] [-pg] [-Olevel]
             [-Idir...] [-Ldir...]
             [-o outfile] infile...

         For any given input file, the file name suffix determines
what kind of
         compilation is done:

         file.d
             D source files.

         file.di
             D interface files.

         file.o
             Object files to link in.

         file.a
             Library files to link in


So I could *guess* that a dot o file is the equivalent of a .obj
file an Windows, and *guess* that a dot a file is the equivalent
of a .lib file on Windows, then follow some Windows instructions
as on the page
http://wiki.dlang.org/Compiling_and_linking_with_DMD_on_Windows
but I would totally be guessing, and I still wouldn't know where
to get any .a files, but I could *guess* that I would get a .o
file by running the compiler and naming the output a .o file by
using the -o switch. I would be totally guessing, and if I'm
wrong, all my builds would be wrong and incompatible with other
people's build systems.

Again, I was hoping there would be some instruction pages or
documentation pages or specifications on this subject.


More information about the Digitalmars-d-learn mailing list