Simple compile error in Visual D...

Mike Parker via Digitalmars-d-ide digitalmars-d-ide at puremagic.com
Thu Oct 9 02:28:29 PDT 2014


On 10/9/2014 7:11 AM, WhatMeWorry wrote:
> I've been trying to debug this for hours. But my compile keeps
> complaining about a file which can't be read (import path[2]) but when I
> run a dir command with a copy and paste of the path, I clearly see the
> file.
>
> 02_SimpleOpenGL_3_3_Program.d(13): Error: module gl3 is in file
> 'derelict\opengl3\gl3.d' which cannot be read
> import path[0] = C:\D\dmd2\windows\bin\..\..\src\phobos
> import path[1] = C:\D\dmd2\windows\bin\..\..\src\druntime\import
> import path[2] =
> C:\D\dmd2\windows\bin\..\..\src\DerelictOrg\DerelictGL3-master\source\derelict\opengl3
>
> binary    C:\D\dmd2\windows\bin\dmd.exe
> version   v2.066.0
> config    C:\D\dmd2\windows\bin\sc.ini
> parse     02_SimpleOpenGL_3_3_Program
>
>
>
> C:\D>dir
> C:\D\dmd2\windows\bin\..\..\src\DerelictOrg\DerelictGL3-master\source\derelict\opengl3

Your import path for DerelictGL3 is wrong. You need the path to the 
parent of top-level package directory, *not* the directory where the 
modules reside. Given that the DerelictGL3 modules are in the 
derelict.opengl3 package, then the derelict directory is the top-level 
and you need its parent.

In this case:
  C:\D\dmd2\windows\bin\..\..\src\DerelictOrg\DerelictGL3-master\source

The compiler will then see derelict.opengl3 in the import declarations 
and will append \derelict\opengl3 to the import path to look for the 
modules.



---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com



More information about the Digitalmars-d-ide mailing list