User forums > Help

Compiling D 2.0

(1/4) > >>

Maxpm:
It's relatively simple to set up Code::Blocks to compile D 1.0 programs, but I'm having a lot of trouble with D 2.0.

I went through all the paths in the compiler settings for the Digital Mars D compiler, changing the paths from "dmd" to "dmd2."  However, when I try to compile a simple "Hello, world!" program I get an error message saying the object file could not be read.  (It's not particularly helpful.)

Here's the full error:

--- Code: ---Compiling: hello.d
object.d: Error: module object is in file 'object.d' which cannot be read
import path[0] = C:\Compilers\dmd2\src\phobos
import path[1] = C:\Compilers\dmd2\bin\..\..\src\phobos
import path[2] = C:\Compilers\dmd2\bin\..\..\src\druntime\import

--- End code ---

stahta01:
Turn on Full Compiler Logging and hopefully the problem will be clear to an D programmer; not sure this site has that many D programmers on it.

http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F

Note: You might try a nightly build if not already using one.

Tim S.

Maxpm:
I downloaded the latest nightly build and enabled full compiler logging.


--- Code: ---dmd.exe  -g -debug    -IC:\Compilers\dmd2\src\phobos  -c hello.d -ofobj\Debug\hello.obj
object.d: Error: module object is in file 'object.d' which cannot be read
import path[0] = C:\Compilers\dmd2\src\phobos
import path[1] = C:\Compilers\dmd2\bin\..\..\src\phobos
import path[2] = C:\Compilers\dmd2\bin\..\..\src\druntime\import

--- End code ---

This is, of course, after a full cleaning.

oBFusCATed:
Something is broken in your compiler.
Try to compile from the command line and if it works it something in C::B, if it doesn't it is something with your setup...

Maxpm:

--- Quote from: oBFusCATed on April 01, 2011, 01:13:12 am ---Something is broken in your compiler.
Try to compile from the command line and if it works it something in C::B, if it doesn't it is something with your setup...

--- End quote ---

Attempting to compile from the command line produces the exact same error.

Navigation

[0] Message Index

[#] Next page

Go to full version