May be a simple dub answer if my question even makes sense?

WhatMeWorry via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Sep 23 19:33:22 PDT 2016


I have D opengl/glfw3 program that I wrote which compiles and 
runs fine, but I always felt it was a bit of a Visual Studio 
hack.   So I thought I'd start anew but this time use dub from 
the get go.  So I did dub int...etc.  And put my existing code 
into the app.d file.  But when I try to build the project with 
dub build, I get

dub build --arch=x86_64 --force
Performing "$DFLAGS" build using dmd for x86_64.
derelict-util 2.1.0: building configuration "library"...
derelict-al 1.0.1: building configuration "library"...
derelict-fi 2.0.2: building configuration "library"...
derelict-ft 1.1.2: building configuration "library"...
derelict-gl3 1.0.19: building configuration "library"...
derelict-glfw3 3.1.0: building configuration 
"derelict-glfw3-dynamic"...
01_01_hello_window ~master: building configuration 
"application"...
source\app.d(154,5): Error: undefined identifier 'glViewport'
source\app.d(157,13): Error: undefined identifier 
'glfwWindowShouldClose'
source\app.d(160,9): Error: undefined identifier 'glfwPollEvents'
source\app.d(166,9): Error: undefined identifier 'glClearColor'
source\app.d(167,9): Error: undefined identifier 'glClear'
source\app.d(170,9): Error: undefined identifier 'glfwSwapBuffers'
source\app.d(174,5): Error: undefined identifier 'glfwTerminate'
dmd failed with exit code 1.
myapp exited with code 2

I see that dub has all the .d import files already placed in
C:\Users\Me\AppData\Roaming\dub\packages\derelict-gl3-1.0.19\derelict-gl3\source\derelict\opengl3

and 
C:\Users\Me\AppData\Roaming\dub\packages\derelict-glfw3-3.1.0\derelict-glfw3\source\derelict\glfw3

which should have all the definitions.  Is their an elegant way 
that I can tell dub to where these definitions? Or do I just have 
to brute force all the -I paths?

I assume there is a slick way of specifying this because what 
happens when say glfw3-3.1.0 gets bumped up to 3.1.1?





More information about the Digitalmars-d-learn mailing list