Re: Should this work: export extern(C) auto ...

2015-03-20 Thread Robert M. Münch via Digitalmars-d-learn
On 2015-03-19 13:22:44 +, Benjamin Thaut said: Generally don't expect to many things to work with DLLs at the moment. Hi, well, I think what's available is good enough to get most things done. Generally speaking only exporting global functions works. Don't try to export classes /

Re: Should this work: export extern(C) auto ...

2015-03-19 Thread Benjamin Thaut via Digitalmars-d-learn
On Thursday, 19 March 2015 at 12:58:42 UTC, Robert M. Münch wrote: On 2015-03-18 21:50:39 +, Adam D. Ruppe said: It will not work because a function with an auto return value is actually a template, and unused templates won't be put into a dll. Ok, that makes it clear. Thanks.

Re: Should this work: export extern(C) auto ...

2015-03-19 Thread Robert M. Münch via Digitalmars-d-learn
On 2015-03-18 21:50:39 +, Adam D. Ruppe said: It will not work because a function with an auto return value is actually a template, and unused templates won't be put into a dll. Ok, that makes it clear. Thanks. -- Robert M. Münch http://www.saphirion.com smarter | better | faster

Should this work: export extern(C) auto ...

2015-03-18 Thread Robert M. Münch via Digitalmars-d-learn
Windows, 32-Bit, DLL: export extern(C) struct1 struct1(){ struct1 x; return(x); } export extern(C) auto struct2(){ struct1 x; return(x); } struct1 is visible in the DLL, struct2 is not visible in the DLL. -- Robert M. Münch http://www.saphirion.com smarter | better | faster

Re: Should this work: export extern(C) auto ...

2015-03-18 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 18 March 2015 at 15:50:16 UTC, Robert M. Münch wrote: struct1 is visible in the DLL, struct2 is not visible in the DLL. It will not work because a function with an auto return value is actually a template, and unused templates won't be put into a dll.