[Dlang-internal] A Proof of Concept for the baremetal D runtime plans

Mike Franklin slavo5150 at yahoo.com
Sat May 4 03:56:42 UTC 2019


On Saturday, 4 May 2019 at 03:06:40 UTC, mbalantz wrote:

> Hello Mike and D community,
>
> -w64 didn't work in my installation, perhaps if you please 
> provide me a list of steps with -w64 in it, it may succeed?

Sorry, I meant -m64, not -w64.  Type `dmd --help` to see a list 
of flags you can pass to the compiler

> Also, my C:\D\dmd2\windows\bin64 directory only contains one 
> file, libcurl.dll.

Your 64-bit libraries will be found in C:\D\dmd2\windows\lib64

phobos64.lib is the D standard library (Phobos) + the D runtime 
in one file.


In general, for each source file you'll do

dmd -c -m64 file1.d
dmd -c -m64 file2.d
dmd -c -m64 file3.d
etc.

Of course you'll also have to pass the appropriate -I flags for 
your imports.

That will create a file1.obj, file2.obj, and file3.obj object 
files.  When you have all your source files compiled to object 
files then you wan to link the object files to create the .exe.

dmd -m64 file1.obj file2.obj file3.obj -o=pongd.exe

This last invocation of `dmd` will not compile any code because 
there aren't any .d files.  Instead `dmd` will pass all of the 
.obj files to the linker on your system to generate an .exe file.

What are you using for your development environment?  You can 
download Visual D (https://github.com/dlang/visuald/releases) and 
use Visual Studio if that's the development environment you're 
most comfortable with.

> I might have to start a new thread as this is getting less and 
> less about trying to demo against baremetal and more about 
> getting my pong file to compile/be ported into D, of which I'd 
> still have some interest.

Post to the "Learn" forum for these kinds of questions.

Mike




More information about the Dlang-internal mailing list