--- Comment #2 from 2012-10-19 20:18:49 PDT ---
(In reply to comment #1)
> We'll need a failing test-case. What contents cause the linker error?

here's a failure case which I simplified to the maximum.
Note that link error occurs with rdmd, not with dmd, as shown below. So that is
a problem with rdmd failing to find dependencies in some cases.

rdmd ${DFLAGS} main

=>Undefined symbols for architecture x86_64:
"_D9main_aux24fun1FZv", referenced from:
_D8main_aux4testFZv in main.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status

dmd ${DFLAGS} main main_aux main_aux2
=> works

Here are the files:

├── main.d
├── main_aux.d
└── main_aux2.d

cat  main.d                                                                    
import main_aux;
void main(){
cat main_aux.d
module main_aux;
//putting the main function here removes link error
//void main(){
//    test;

//import main_aux2; //uncomment removes link error
void test(){
    import main_aux2;

cat main_aux2.d
module main_aux2;
void fun1() {

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to