I’m trying to include a Lua header file lua.hpp and I get undefined reference errors when compiling. Is there somewhere I need to define header search paths?
My makefile has a bunch of this at the top. Probably what you are looking for?
# FLAGS will be passed to both the C and C++ compiler FLAGS += -I./dsp/generators -I./dsp/utils -I./dsp/filters FLAGS += -I./dsp/third-party/falco -I./dsp/third-party/kiss_fft130 FLAGS += -I./dsp/third-party/kiss_fft130/tools -I./dsp/third-party/src -I./dsp/third-party/midifile FLAGS += -I./dsp
but if it couldn’t find the header I would expect a different error. Are you sure this isn’t a linker error?
I have lua-src folder in the src folder. How would I reference this from the makefile?
Something like this?
# Add .cpp and .c files to the build SOURCES += $(wildcard src/*.cpp) SOURCES += $(wildcard dsp/**/*.cpp) SOURCES += $(wildcard dsp/third-party/falco/*.cpp)
There are just snippets taken from my own repo.
I added :
SOURCES += $(wildcard src/lua-src/*.cpp)
Still no luck
I had success building Lua in my pluging a while ago! Never actually used it for anything, just did it for sport, but maybe this thread will have useful info? I’m integrating QuickJS in my plugin. I integrated them both with the same method as VCV Prototype does
Need to add a wildcard for *.c files since the lua source is all .c files
All good now, just needed to have .c files compiled
glad you got it figured out
Didn’t realize Prototype existed, that was essentially what I was trying to create lol
Ya Prototype is about to do Pure Data too.
You need to compile Lua statically and then link it statically to your plugin in your
Makefile. If you link to your system copy dynamically, users won’t be able to use the plugin.