How to set up Derelict GLFW3 with VisualD ?
WhatMeWorry via Digitalmars-d-ide
digitalmars-d-ide at puremagic.com
Tue Mar 22 11:28:53 PDT 2016
On Sunday, 31 January 2016 at 18:22:53 UTC, Whirlpool wrote:
> Hi,
>
> I would like to learn GLFW on Windows 10 with VisualD, but I
> don't know much about Visual Studio. I installed DMD 2.070.0
> with Visual Studio Community 2013 and dub. Following the
> instructions here
> [http://derelictorg.github.io/compiling.html], I compiled
> DerelictGLFW3 and DerelictUtil. I put the resulting lib files
> into a libs\ folder in my project directory, and added that
> folder into the "Additional Import Paths" field in Solution
> properties > Configuration Properties > Compiler > General. I
> also added it into Configuration Properties > Linker > General
> > Library Search Path. But when trying to build the project, I
> get "Error 1 Error: module glfw3 is in file
> 'derelict\glfw3\glfw3.d' which cannot be
> read C:\Users\username\documents\visual studio
> 2013\Projects\ConsoleApp1\ConsoleApp1\main.d 1"
>
> The code so far is only :
>
> import derelict.glfw3.glfw3;
>
> int main(string[] argv) {
> DerelictGLFW3.load();
> return 0;
> }
>
> I don't know how to proceed. Is there a tutorial for this
> somewhere ? Please could you help me ? Thank you
Since this is complaining about the .d file, this must be a
compile error. So we can take the Library Search Paths out of
the equation. I would take the Search path you used and append
it to you import path and double check that it points to were
your glfw3.d resides.
For instance, in my project in the Compiler>General>Additional
imports I have:
N:\DUB_Packages\DerelictOrg\DerelictGLFW3\source
And in my D project I have:
import derelict.glfw3.glfw3;
So now, When I navigate to the full path,
N:\DUB_Packages\DerelictOrg\DerelictGLFW3\source\derelict\glfw3
I see that there is indeed a file present named: glfw3.d
Note: I made one of the cardinal sins of programming by using a
hard coded N:\... absolute path. But I wanted to keep things
real simple.
If that fails, a really kludgy solution, might be to simply move
a copy of glfw3.d to you home directory. But that would only be
if you want a quick a very dirty band aid. If a school project
is due the next day :)
More information about the Digitalmars-d-ide
mailing list