Author Topic: Digital Mars D compiler problem  (Read 475 times)

Offline Haotian

  • Single posting newcomer
  • *
  • Posts: 1
Digital Mars D compiler problem
« on: August 03, 2017, 02:22:07 pm »
Hi there,

I am relatively new to C#, and I am running Codeblocks 16.01 on Windows 10 build 15063 (the latest).

The complier I am currently using is Digital Mars D version 2.074.0.

WHEN I try to run a simple program (like Hello World), the codes won't build w/ build log returned as follow:

-------------- Build file: "no target" in "no project" (compiler: unknown)---------------

[ 50.0%] dmd.exe   -IC:\dmd\src\phobos -IF:\codeblocks\DMD\D\dmd2\windows\src\phobos -c "C:\Users\Haotian\Desktop\C#\Hello world.c" -of"C:\Users\Haotian\Desktop\C#\Hello world.obj"
Error: unrecognized file extension c
Process terminated with status 1 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))

Just a little confused, I have already set my compiler to DMD using the auto detect function (as it does detect the compiler itself and points to the directory containing DMD), whereas it seems that the codes are still not building.   

I have also tried re-downloading and re-installing codeblocks and the compiler, but neither of them worked out for me :(

Many thanks to any helping ;)

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7258
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Digital Mars D compiler problem
« Reply #1 on: August 03, 2017, 03:08:02 pm »
If I understand it correctly you want to compile a c-file in a c#-dedicated folder with a d-compiler ?
Use the correct compiler for the correct language and be aware, that the file-ending is important to recognize the content (in most cases).