View previous topic :: View next topic |
Author |
Message |
alex_d
Joined: 01 Nov 2006 Posts: 16
|
Posted: Wed Nov 01, 2006 9:13 pm Post subject: WinXP: object.d: module object cannot read file 'object.d' |
|
|
Hi everyone
I followed the instructions of installing DMD, when I try to compile a file I get this error: object.d: module object cannot read file 'object.d' on WinXP.
I found the solution for Linux by googling but I did not find anything about Windows. Please help me. |
|
Back to top |
|
|
clayasaurus
Joined: 21 May 2004 Posts: 857
|
Posted: Wed Nov 01, 2006 11:25 pm Post subject: |
|
|
Can you tell us the exact location and steps you used to install DMD ? |
|
Back to top |
|
|
Bradley Smith
Joined: 20 Jun 2006 Posts: 60
|
Posted: Wed Nov 01, 2006 11:28 pm Post subject: |
|
|
Personally, I use the following procedure.
- Extract dmc.zip to C:\
- Extract dmd.172.zip to C:\
- Add c:\dm\bin;c:\dmd\bin to PATH
- Edit c:\dmd\bin\sc.ini to contain the following:
LIB="?@P?\..\lib";"?@P?\..\..\dm\lib"
- Edit c:\dm\bin\sc.ini to contain the following:
LIB="?@P?\..\lib";"?@P?\..\..\dmd\lib";"?@P?\..\mfc\lib";?LIB?
|
|
Back to top |
|
|
alex_d
Joined: 01 Nov 2006 Posts: 16
|
Posted: Thu Nov 02, 2006 1:22 am Post subject: |
|
|
Thanks guys!
Ok, I discovered something very strange. Before I continue, I will tell the exact steps I did but first let me say this. I was totally shocked with this one.
Check this out from command prompt:
C:\>C:\dmd\bin\dmd.exe C:\dtest.d
C:\dmd\bin\..\..\dm\bin\link.exe dtest,,,user32+kernel32/noi;
Compiled successfully! BUT Check this out:
C:\>cd C:\dmd\bin
C:\dmd\bin>dmd.exe C:\dtest.d
object.d: module object cannot read file 'object.d'
Looks like when I run dmd.exe from within its path from where it is installed, I get the error but when I run it from an external location, there is no error! How can this be??
This is what I did to install DMD.
I downloaded dmd.zip from http://ftp.digitalmars.com/dmd.zip
I downloaded dmc.zip from http://ftp.digitalmars.com/dmc.zip
Then,
cd C:\
C:\>unzip dmd.zip
C:\>unzip dmc.zip
It asked me whether to overwrite some files, I said Yes.
That's all I did |
|
Back to top |
|
|
alex_d
Joined: 01 Nov 2006 Posts: 16
|
Posted: Thu Nov 02, 2006 2:38 am Post subject: |
|
|
Bradley Smith, I tried that but it didn't make any change. I just copy/pasted the string as you have written it. I will double check, may be I pasted it to the wrong section...but anyway....
When I launch dmd.exe from an an absolute location, it works. I am puzzled. I didn't know launching a program like this might make a difference and I figured it out by accident. |
|
Back to top |
|
|
Bradley Smith
Joined: 20 Jun 2006 Posts: 60
|
Posted: Thu Nov 02, 2006 1:59 pm Post subject: |
|
|
I also get the error when building in the C:\dmd\bin directory. However, it doesn't require using the absolute path, and it only occurs when in the c:\dmd\bin directory. Most of the time you won't build there anyway.
C:\>cd c:\dmd\bin
C:\dmd\bin>dmd c:\tmp.d
object.d: module object cannot read file 'object.d'
C:\dmd\bin>cd \
C:\>dmd c:\tmp.d
c:\dmd\bin\..\..\dm\bin\link.exe tmp,,,user32+kernel32/noi;
I will report this as a bug, but since it is uncommon to build in the dmd\bin directory, it probably won't get fixed for awhile. |
|
Back to top |
|
|
clayasaurus
Joined: 21 May 2004 Posts: 857
|
Posted: Thu Nov 02, 2006 4:30 pm Post subject: |
|
|
I get the same problem.
Solution: Don't build your projects in the dmd/bin directory. |
|
Back to top |
|
|
alex_d
Joined: 01 Nov 2006 Posts: 16
|
Posted: Fri Nov 03, 2006 4:20 am Post subject: |
|
|
So we have something here which is good Good as in, we pin-pointed how to produce the error. |
|
Back to top |
|
|
Bradley Smith
Joined: 20 Jun 2006 Posts: 60
|
Posted: Sat Nov 25, 2006 12:36 pm Post subject: |
|
|
This problem has been fixed in DMD version 0.175. |
|
Back to top |
|
|
jgeewax
Joined: 19 Oct 2006 Posts: 2 Location: Philadelphia, PA, USA
|
Posted: Sun Feb 04, 2007 11:07 am Post subject: |
|
|
With a recent installation of Tango I'm having the 'object.d' issue. In case anyone is having a similar problem due to Tango and not the standard libphobos, the post is here:
http://www.dsource.org/projects/tango/forums/topic/17#62
JJG |
|
Back to top |
|
|
|