Passing directory as compiler argument not finding file

Cym13 cpicard at openmailbox.org
Fri Apr 13 12:46:32 UTC 2018


On Friday, 13 April 2018 at 01:27:06 UTC, Tony wrote:
> I think that the typical model (at least in other languages) is 
> to only compile one D source file at a time. Compile the b.d 
> file with the -c option to create an object file. Then put the 
> object file in a library file (either static (easier) or 
> dynamic). Then you can use the -L compiler option to specify 
> the directory of the library and the -l  compiler option to 
> specify the library (library name is shortened - libb.a 
> referenced as -lb).

Regardless of whether that would work or not this is the opposite 
of what's recommended in D. D compilers expect you to compile 
everything at once, or at least by module. That's where it works 
best when it comes to optimizations etc.


More information about the Digitalmars-d-learn mailing list