Strange DSSS/Tango compile error

Jarrett Billingsley jarrett.billingsley at gmail.com
Wed Oct 15 11:39:26 PDT 2008


On Wed, Oct 15, 2008 at 2:13 PM, Robert Kosek
<robert.kosek at thewickedflea.com> wrote:
> Jarrett Billingsley wrote:
>>
>> It just looks like it's not linking in the Tango libraries.  I thought
>> EasyD would have done that for you.
>
> That's the odd part, it usually does!  In fact, the above command line
> arguments are what are always executed (beyond my specifying which files to
> build).
>
> Here's the thing: if I remove a reference to my rpg.dice module (in dice.d
> in the same directory) it compiles and links Tango.  Thus I think it's not
> linking *my* code rather than Tango.  I think Tango is linking just fine.
>  (Perhaps my private import is the problem?)
>
> This compiles:
>>
>> module rpg;
>>
>> import tango.io.Stdout/*, rpg.dice*/;
>>
>> void main() {
>>   /* Dice d = {4,6};
>>    Stdout.format("Dice roll is(4d6): {}", d.roll());*/
>>    Stdout("This is a test!").newline.flush;
>> }
>
> But to uncomment the pieces for the dice rolling, and my linking dies
> immediately.
>
> What should I do for a project that uses multiple files for its compilation?
>  Should I have any special file system structure within the directory, or
> should I add a special search path to the build?
>
> Thanks,
> Robert
>

Oh, I just realized what it is, I think.  Don't build dice.d, dsss
will build it for you automatically.  Just do "dsss build rpg.d" and
it'll automatically compile and link rpg as well as any dependent
modules.  I think it's trying to compile dice.d as a program, which of
course won't work.


More information about the Digitalmars-d-learn mailing list