Thread overview
Boneheaded question regarding compilation...
Apr 02
Mike Shah
Apr 02
Dennis
April 01

Huge fan of Mike Shah's YouTube videos regarding D and his latest for D conference:

https://mshah.io/conf/24/DConf%20%20Online%202024%20_%20The%20Case%20for%20Graphics%20Programming%20in%20Dlang.pdf

So I installed github desktop app and cloned his Talks repo. There is a build command commented out at the top of the main.d file which I've been trying to compile, via the command line:

C:\Users\kheas\Documents\Talks\2024\dconf_online\hello_triangle>dmd -g -J. main.d ./glad/gl/*.d -L-L/usr/local/lib -L-lglfw3 -of=prog && ./prog
Error: cannot find input file .\glad\gl\*.d
import path[0] = C:\D\dmd2\windows\bin64....\src\phobos
import path[1] = C:\D\dmd2\windows\bin64....\src\druntime\import

I'm using a Windows 11 machine so I thought that maybe the syntax was for Linux environment. But replacing all the '/' with '' did not work.

April 02

On Monday, 1 April 2024 at 21:23:50 UTC, WhatMeWorry wrote:

>

Huge fan of Mike Shah's YouTube videos regarding D and his latest for D conference:

https://mshah.io/conf/24/DConf%20%20Online%202024%20_%20The%20Case%20for%20Graphics%20Programming%20in%20Dlang.pdf

So I installed github desktop app and cloned his Talks repo. There is a build command commented out at the top of the main.d file which I've been trying to compile, via the command line:

C:\Users\kheas\Documents\Talks\2024\dconf_online\hello_triangle>dmd -g -J. main.d ./glad/gl/*.d -L-L/usr/local/lib -L-lglfw3 -of=prog && ./prog
Error: cannot find input file .\glad\gl\*.d
import path[0] = C:\D\dmd2\windows\bin64....\src\phobos
import path[1] = C:\D\dmd2\windows\bin64....\src\druntime\import

I'm using a Windows 11 machine so I thought that maybe the syntax was for Linux environment. But replacing all the '/' with '\' did not work.

Those are indeed Linux parameters and not windows compatible. This can’t be fixed by switching slash styles.

You need the appropriate libs and the appropriate linker switches.

-Steve

April 02

On Monday, 1 April 2024 at 21:23:50 UTC, WhatMeWorry wrote:

>

Huge fan of Mike Shah's YouTube videos regarding D and his latest for D conference:

https://mshah.io/conf/24/DConf%20%20Online%202024%20_%20The%20Case%20for%20Graphics%20Programming%20in%20Dlang.pdf

So I installed github desktop app and cloned his Talks repo. There is a build command commented out at the top of the main.d file which I've been trying to compile, via the command line:

C:\Users\kheas\Documents\Talks\2024\dconf_online\hello_triangle>dmd -g -J. main.d ./glad/gl/*.d -L-L/usr/local/lib -L-lglfw3 -of=prog && ./prog
Error: cannot find input file .\glad\gl\*.d
import path[0] = C:\D\dmd2\windows\bin64....\src\phobos
import path[1] = C:\D\dmd2\windows\bin64....\src\druntime\import

I'm using a Windows 11 machine so I thought that maybe the syntax was for Linux environment. But replacing all the '/' with '' did not work.

An easier fix may be perhaps to just use 'dub' and install the glfw dependency. In my talk, I did everything from scratch (my preferred way), though I suspect using dub with glfw-d (https://code.dlang.org/packages/glfw-d) may provide less resistance.

April 02

On Tuesday, 2 April 2024 at 18:21:58 UTC, Mike Shah wrote:

>

An easier fix may be perhaps to just use 'dub' and install the glfw dependency. In my talk, I did everything from scratch (my preferred way), though I suspect using dub with glfw-d (https://code.dlang.org/packages/glfw-d) may provide less resistance.

glfw-d also provides an OpenGL hello world triangle example:

https://github.com/dkorpel/glfw-d/tree/master/examples/triangle-gl

It uses bindbc-opengl instead of glad to load OpenGL functions.