www.digitalmars.com         C & C++   DMDScript  

D - Import glitch

reply Andy Friesen <andy ikagames.com> writes:
Since D is case sensitive, and Windows filenames are not, things get 
kind of odd when inconsistent case is used with import statements.

one.d:
import sdl;
import two;

void main()
{
    SDL_Init(...);
}

two.d:
import SDL;

void initVideo()
{
    SDL_SetVideoMode(...);
}

..\sdl\SDL.d(57): function SDL_Init conflicts with sdl.SDL_Init at 
..\sdl\sdl.d(57)

This will cause symbols to conflict with themselves when you try to 
compile it.  Using consistent case fixes the problem, but the error 
message isn't very intuitive.
Apr 08 2003
parent "Walter" <walter digitalmars.com> writes:
"Andy Friesen" <andy ikagames.com> wrote in message
news:b6vii3$2iim$1 digitaldaemon.com...
 Since D is case sensitive, and Windows filenames are not, things get
 kind of odd when inconsistent case is used with import statements.

I know. The most practical solution is to simply stick with lower case letters for module names.
May 25 2003