On 24/09/2016 2:33 PM, WhatMeWorry wrote:

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?

Can you please post the dub file?
Along with your source file.

I have no idea what dub is even trying to do otherwise.

Reply via email to