Thread overview
Add multiple modules to a DLL
Jan 10, 2008
peter
Jan 10, 2008
peter
Jan 10, 2008
Don Clugston
Jan 11, 2008
peter
Jan 11, 2008
torhu
Jan 15, 2008
peter
January 10, 2008
Greetings,

I'm stuck here again. I compiled successfully the dll sample (d calling d code) in the D web site.

The issue here is that i want to add multiples modules to the dll file.
I'm able to compile and create the dll but test.d is unable to find the other modules, it only recognizes contents from mydll.d.

Am i doing something wrong? Please help.

Thanks in advace.
January 10, 2008
peter Wrote:

> Greetings,
> 
> I'm stuck here again. I compiled successfully the dll sample (d calling d code) in the D web site.
> 
> The issue here is that i want to add multiples modules to the dll file.
> I'm able to compile and create the dll but test.d is unable to find the other modules, it only recognizes contents from mydll.d.
> 
> Am i doing something wrong? Please help.
> 
> Thanks in advace.

These words might be dificult to understand, attachments in this web-news based forum were impossible so i uploaded to megaupload a zip file with the dll sample from the website, it includes the source and precompiled binaries,
Also, there´s an ini.d file (copyright (c) Chris Miller www.dprogramming.com), that´s a file i want to include in the dll but i get this module not being found and with a few tweaks i get symbol errors.
I really don´t know what to do.

You can download the file from http://www.megaupload.com/?d=87CHSW75
The source included compiles just fine, i haven't added a single line related to ini.d, it´s clean.

Thanx 4 your support guys, you´ve allways been there when needed, that´s unvaluable, thanx 4 keepeng the D community group alive.
January 10, 2008
peter wrote:
> Greetings,
> 
> I'm stuck here again. I compiled successfully the dll sample (d calling d code) in the D web site.
> 
> The issue here is that i want to add multiples modules to the dll file.
> I'm able to compile and create the dll but test.d is unable to find the other modules, it only recognizes contents from mydll.d.
> 
> Am i doing something wrong? Please help.
> 
> Thanks in advace.

* You need to pass all the filenames on the command line,
eg
dmd mydll.d test.d
*You can also use bud/build instead. You *cannot* use rebuild/dsss to build a dll.
Bud works very well for me with making DLLs. Although I've never tried to use a D DLL from D, only from C++.
January 11, 2008
Don Clugston Wrote:

> peter wrote:
> > Greetings,
> > 
> > I'm stuck here again. I compiled successfully the dll sample (d calling d code) in the D web site.
> > 
> > The issue here is that i want to add multiples modules to the dll file.
> > I'm able to compile and create the dll but test.d is unable to find the other modules, it only recognizes contents from mydll.d.
> > 
> > Am i doing something wrong? Please help.
> > 
> > Thanks in advace.
> 
> * You need to pass all the filenames on the command line,
> eg
> dmd mydll.d test.d
> *You can also use bud/build instead. You *cannot* use rebuild/dsss to build a dll.
> Bud works very well for me with making DLLs. Although I've never tried to use a
> D DLL from D, only from C++.

yes, i have done this (the dll compiles fine) but the main exe is unable to compile because it doesn´t recognizes the ini module in the dll.
January 11, 2008
peter wrote:
> Don Clugston Wrote:
>> 
>> * You need to pass all the filenames on the command line,
>> eg
>> dmd mydll.d test.d
>> *You can also use bud/build instead. You *cannot* use rebuild/dsss to build a dll.
>> Bud works very well for me with making DLLs. Although I've never tried to use a D DLL from D, only from C++.
> 
> yes, i have done this (the dll compiles fine) but the main exe is unable to compile because it doesn´t recognizes the ini module in the dll.

What error messages do you get, exactly?
January 15, 2008
torhu Wrote:

> peter wrote:
> > Don Clugston Wrote:
> >> 
> >> * You need to pass all the filenames on the command line,
> >> eg
> >> dmd mydll.d test.d
> >> *You can also use bud/build instead. You *cannot* use rebuild/dsss to build a dll.
> >> Bud works very well for me with making DLLs. Although I've never tried to use a
> >> D DLL from D, only from C++.
> > 
> > yes, i have done this (the dll compiles fine) but the main exe is unable to compile because it doesn´t recognizes the ini module in the dll.
> 
> What error messages do you get, exactly?

I get symbol errors:
_D3ini3Ini7_ClassZ

And you can´t simple declare an import in a def file because you can´t declare = mydll.ini.Ini (it doesn´t work) or = ini.Ini (as ini.dll doesn´t exists)