Using D libraries with SDL. Error: "Cannot find module protobuf'

Nicol Farran Terra nicolterramaze at gmail.com
Sat Aug 24 00:24:12 UTC 2024


Here is my painpoint. I am trying to make a game engine using a 
combination of D and Swift, my two favorite programming 
languages. I chose D specifically for lower level features, like 
stuff for Vulkan and OpenGL as a 'learning experience'. That 
said, I wanted to keep my dependencies minimal, but I wanted to 
use protobuf for data serialization between the two.

I am not sure if this expected behavior, but importing this in my 
app.d does not work. I get an error about a missing import. I ran 
to my 'root' where my dub.sdl was, ran the build for the library 
which worked, but when I went back to my file, I get the same 
behavior. I am not sure what to make of this. I figured the 
library was out of date, but I didn't think much of it. I am 
actually not sure what to do since package managers are kind of 
voodoo magic to me.

To start, I am on Arch Linux and using the most recent D. Here is 
my dub.sdl. If this continues to give me issues, I might use a 
different library or serialization method...

name "protostate"
description "A minimal D application."
authors "Nicol Farran Terra"
copyright "Copyright © 2024, Nicol Farran Terra"
license "MIT"
dependency "protobuf" version="~>0.6.2"

I think this is expected behavior my first intuition is simply 
that 'this does not conform with modern D' or 'it is not found 
and I cannot install a package with dub'.
Both seem plausible to me. Any help would be appreciated.



More information about the Digitalmars-d-learn mailing list