Setup SCsub file correctly for binding thirdparty static library

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

I am trying to write a module to implement the FMOD audio engine into Godot. (My code here GitHub - rmazzier/FMOD-Module---Godot: Trying to implement FMOD Godot Engine via module )

My plan was to implement a custom Node, containing the basic functionalities of the FMOD audio engine (i followed this really nice guide for using the FMOD API Making a Basic FMOD Audio Engine in C++ ).
As long as the fmod.cpp file is empty, so without the methods implementations, the engine compiles correctly and a empty “FMode” node, (which inherits from Node) appears in the compiled Godot.

As soon as I write a method implementation in the .cpp file though, I get all sorts of linker errors, which made me think I did something wrong in setting up the SCsub file, which tells SCons where to look for external libraries (I suppose scons wants the .a files, so the static libraries, to know how to correctly link the program).

Does anyone have any idea of what I’m doing wrong, or can suggest where I can find more info on how the SConstruct files work?