Re: Export values (enum, int, char[]...) for DLL

2010-05-13 Thread torhu
On 13.05.2010 18:23, Nrgyzer wrote: Nrgyzer Wrote: dmd now exports all values successfully. But when I try to export a class, I get the following errors: "Error 42: Symbol Undefined _D5mydll1t7__ClassZ Error 42: Symbol Undefined _D5mydll1t5_ctorMFZC11mydll1t" Source of mydll.d is: export clas

Re: Export values (enum, int, char[]...) for DLL

2010-05-13 Thread Nrgyzer
Nrgyzer Wrote: > torhu Wrote: > > > On 06.05.2010 16:06, Nrgyzer wrote: > > > Thanks, but doesn't work :( > > > > > > My files contain: > > > > > > mydll.d: > > > > > > module mydll; > > > export extern int i; > > > > > > mydll2.d: > > > > > > module mydll; > > > export int i = 7; > > > > > > tes

Re: Export values (enum, int, char[]...) for DLL

2010-05-07 Thread Nrgyzer
torhu Wrote: > On 06.05.2010 16:06, Nrgyzer wrote: > > Thanks, but doesn't work :( > > > > My files contain: > > > > mydll.d: > > > > module mydll; > > export extern int i; > > > > mydll2.d: > > > > module mydll; > > export int i = 7; > > > > test.d: > > > > import mydll; > > import std.stdio; > >

Re: Export values (enum, int, char[]...) for DLL

2010-05-06 Thread torhu
On 06.05.2010 16:06, Nrgyzer wrote: Thanks, but doesn't work :( My files contain: mydll.d: module mydll; export extern int i; mydll2.d: module mydll; export int i = 7; test.d: import mydll; import std.stdio; void main() { writefln(i); } I can compile the dll, but when I compile t

Re: Export values (enum, int, char[]...) for DLL

2010-05-06 Thread Nrgyzer
torhu Wrote: > On 04.05.2010 21:46, Nrgyzer wrote: > > Hello everybody, > > > > I'm trying to create a (very) simple DLL by using D. Now I want export > > values - is there any way do this... > > Off the top of my head, I think it goes like this: > > To export from a DLL: > export int i = 7; >

Re: Export values (enum, int, char[]...) for DLL

2010-05-05 Thread torhu
On 04.05.2010 21:46, Nrgyzer wrote: Hello everybody, I'm trying to create a (very) simple DLL by using D. Now I want export values - is there any way do this... Off the top of my head, I think it goes like this: To export from a DLL: export int i = 7; To export from a DLL, with C name mangl

Re: Export values (enum, int, char[]...) for DLL

2010-05-05 Thread Nrgyzer
Ary Borenszweig Wrote: > Nrgyzer wrote: > > Hello everybody, > > > > I'm trying to create a (very) simple DLL by using D. Now I want export > > values - is there any way do this... for example: > > > > Example: > > > > mydll.d: > > export int i; > > > > mydll2.d: > > export int i = 99; > > >

Re: Export values (enum, int, char[]...) for DLL

2010-05-05 Thread Ary Borenszweig
Nrgyzer wrote: Hello everybody, I'm trying to create a (very) simple DLL by using D. Now I want export values - is there any way do this... for example: Example: mydll.d: export int i; mydll2.d: export int i = 99; dll.d: // Copied from http://www.digitalmars.com/d/2.0/dll.html test.d: impo

Export values (enum, int, char[]...) for DLL

2010-05-04 Thread Nrgyzer
Hello everybody, I'm trying to create a (very) simple DLL by using D. Now I want export values - is there any way do this... for example: Example: mydll.d: export int i; mydll2.d: export int i = 99; dll.d: // Copied from http://www.digitalmars.com/d/2.0/dll.html test.d: import std.stdio; imp