0 votes


I'm currently trying to compile a C++ module using libsodium.
The folder structure looks like this:

godot/modules/sodium   //Module path
godot/modules/sodium/libsodium-stable   //Sodium repository

At first I tried compiling the project, then building Godot with the following SCsub :

env_sodium = env.Clone()

#.a files
#lib name
#Module files

I double, triple and quadruple checked, the libsodium.a file and headers are in the specified directories
The previous snippet reaches [100%], then blasts a bunch of undefined reference to <whatever sodium method> errors

With a different library, this also happened, but I could fix this by just directly including the source files; I can't quite do this with sodium, since headers and source files are in separate directories, and whenever I try building w/ the following SCsub :

env_sodium = env.Clone()

#Header directory
#and many more

I always get <some header>.h : No such file or directory for the source files.
Can anyone give me a hand?

I'm running Manjaro, I haven't tried any other distros or OS.

Thank you in advance!

in Engine by (19 points)

1 Answer

0 votes
Best answer

Fixed this by appending the include directories to env. Some headers still couldn't be found so I used Prepend, which for whatever reason worked

by (19 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.