www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - [bug?] Strange compiler behaviour

↑ ↓ ← "Matthew" <nowhere noaddress.co.us> writes:
I'm working on releasing the shwild library, and getting some problems with 
DMC++.

The following line compiles successfully:

dmc -c -wc -wx -Ae -Ar -DWIN32 -DSHWILD_NO_IMPLICIT_LINK -I..\..\include
-I"H:\freelibs\openrj\current\include" 
 -I"H:\STLSoft\Releases\current\STLSoft\include" -o.\matches.debug.obj 
..\..\src\Matches.cpp

However, the following line does not:

dmc -c -wc -wx -Ae -Ar -DWIN32 -DSHWILD_NO_IMPLICIT_LINK -I..\..\include
-Ih:\freelibs\cstring\current\include 
 -I"H:\freelibs\openrj\current\include"
-I"H:\STLSoft\Releases\current\STLSoft\include" 
 -o.\matches.debug.obj ..\..\src\Matches.cpp

with the error:

    Fatal error: unable to open input file 
'h:\freelibs\cstring\current\include\cstring'
    --- errorlevel 1

I'm at a bit of a loss here. Any ideas?

Cheers

Matthew
Apr 29 2006
↑ ↓ Walter Bright <newshound digitalmars.com> writes:
Matthew wrote:
     Fatal error: unable to open input file 
 'h:\freelibs\cstring\current\include\cstring'
     --- errorlevel 1
 
 I'm at a bit of a loss here. Any ideas?

Does the file exist?
May 01 2006
↑ ↓ "Matthew" <nowhere noaddress.co.us> writes:
"Walter Bright" <newshound digitalmars.com> wrote in message 
news:e34j2c$1pdu$2 digitaldaemon.com...
 Matthew wrote:
     Fatal error: unable to open input file 
 'h:\freelibs\cstring\current\include\cstring'
     --- errorlevel 1

 I'm at a bit of a loss here. Any ideas?

Does the file exist?

I suspect that the problem is related to the fact that 'h:\freelibs\cstring\current\include\cstring' is a directory (within which the cstring.h file resides, i.e. 'h:\freelibs\cstring\current\include\cstring\cstring.h', in response to a #include <cstring/cstring.h>), and DMC++ seeks to read that directory as a file when asked to do so via a #include <cstring> in STLport. I think this is a compiler bug, and the fix is to make sure that when a file-system entry is matched in the include-paths include resolution it is ignored if it is not a file (or a file-link, were it a UNIX concern, which DMC++ of course is not <g>). That sounds reasonable, I'm sure you'd agree, but does it sound feasible? Cheers Matthew
May 01 2006
↑ ↓ → Walter Bright <newshound digitalmars.com> writes:
Matthew wrote:
 "Walter Bright" <newshound digitalmars.com> wrote in message 
 news:e34j2c$1pdu$2 digitaldaemon.com...
 Matthew wrote:
     Fatal error: unable to open input file 
 'h:\freelibs\cstring\current\include\cstring'
     --- errorlevel 1

 I'm at a bit of a loss here. Any ideas?


I suspect that the problem is related to the fact that 'h:\freelibs\cstring\current\include\cstring' is a directory (within which the cstring.h file resides, i.e. 'h:\freelibs\cstring\current\include\cstring\cstring.h', in response to a #include <cstring/cstring.h>), and DMC++ seeks to read that directory as a file when asked to do so via a #include <cstring> in STLport. I think this is a compiler bug, and the fix is to make sure that when a file-system entry is matched in the include-paths include resolution it is ignored if it is not a file (or a file-link, were it a UNIX concern, which DMC++ of course is not <g>). That sounds reasonable, I'm sure you'd agree, but does it sound feasible?

I'd have to look at the code that implements it, it's over 18 years old <g>.
May 01 2006