digitalmars.D - D compiler embedding
- Peloto <peloto peloto.com> May 03 2009
- "Simen Kjaeraas" <simen.kjaras gmail.com> May 03 2009
- Robert Fraser <fraserofthenight gmail.com> May 03 2009
- Jason House <jason.james.house gmail.com> May 04 2009
Can I embed the D compiler into my application? For example:
Dcompiler c;
Dcompiler::result *r = c.compile("mySource.d");
fstream f("result.bin");
f.write(r->GetBuffer(),r->GetNBytes());
And other doubt... where's the Solaris port for the D compiler? I see only
Windows, linux, freeBSD and MacOSX.
thx.
May 03 2009
Peloto wrote:Can I embed the D compiler into my application? For example: Dcompiler c; Dcompiler::result *r = c.compile("mySource.d"); fstream f("result.bin"); f.write(r->GetBuffer(),r->GetNBytes());
Short answer: No. Long answer: Several people have been asking for this, and there has been at least one implementation. Burton Radons wrote http://members.shaw.ca/burton-radons/The%20Joy%20and%20Gibbering%20Terror%20of%20Custom-Loading 20Executables.html, which I have not myself tried, but it seems like it should do what you ask for. -- Simen
May 03 2009
Peloto wrote:And other doubt... where's the Solaris port for the D compiler? I see only Windows, linux, freeBSD and MacOSX.
http://www.dsource.org/projects/ldc
May 03 2009
Robert Fraser Wrote:Peloto wrote:And other doubt... where's the Solaris port for the D compiler? I see only Windows, linux, freeBSD and MacOSX.
http://www.dsource.org/projects/ldc
The Phobos changelog implies the next D1 release will have Dolaris support. D2 support is on hold due to other drastic changes. Regardless, LDC is a good recommendation; it supports a lot of platforms dmd does not. I'm still hoping for 64 bit support in dmd.
May 04 2009









"Simen Kjaeraas" <simen.kjaras gmail.com> 