Is this rdmd bug or my fault ?

zabruk70 via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jan 8 07:45:52 PST 2016


OS: Windows 7 (32 bit)
dmd: 2.069.2 and 2.070.0-b1

Then i used "-g" switch with RDMD, then i have OPTLINK error.
Reduced code, 3 modules, 2 of them in subdir:

moduleA.d
test\moduleB.d
test\moduleC.d

/////////////
module moduleA;

public void funcA () {
   import test.moduleB: funcB;
   return;
}

void main(string[] args) {
   return;
}

/////////////
module test.moduleB;

public void funcB () {
   import test.moduleC: funcC;
   funcC();

   return;
}

/////////////
module test.moduleC;

public void funcC () {
   return;
}

/////////////


C:\dmd2\windows\bin\rdmd.exe moduleA.d
//no errors, moduleA.exe created


C:\dmd2\windows\bin\rdmd.exe -g moduleA.d
Copyright (C) Digital Mars 1989-2013  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
C:\Users\user\AppData\Local\Temp\.rdmd\rdmd-moduleA.d-D3D7676836384146D1D9D907CF20EC26\objs\moduleA.exe.obj(moduleA.exe)
  Error 42: Symbol Undefined _D4test7moduleC5funcCFZv
--- errorlevel 1

Problem disappear, then i move import in test.modileB to global 
level:

/////////////
module test.moduleB;

import test.moduleC: funcC;  //this works

public void funcB () {
   //import test.moduleC: funcC;  //this dont works
   funcC();

   return;
}
/////////////


Should i create bugreport, or this is my mistake?


More information about the Digitalmars-d-learn mailing list