How do I reference another Module within a Custom C++ Module that I'm writing?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By hidemat

I’m trying to write a module that use the godot-sqlite module so that I can make database calls without having to re-write all of the whole sqlite logic. Is this at all possible?

I would assume that it would be adding an include statement:

#include "modules/sqlite/sqlite.h"

And then instantiating the class that way. Is this the right approach? I’m really new to c++ so it’s a huge headache trying to figure this out. So any help will be greatly appreciated :slight_smile:

:bust_in_silhouette: Reply From: hidemat

It took me a while, but indeed this seems to be the way to reference another module within your custom module. I successfully accessed my database from my custom module using the sqlite module:

#include "modules/sqlite/sqlite.h"

Please correct me if there is a better way to do this.