I’m having a linker problem and getting the error:
undefined reference to 'system'
C:\Users\Jez.platformio\packages\framework-arduinoespressif32\cores\esp32/WString.h:48: undefined reference to
system' .pio\build\nodemcu-32s\lib447\liblua.a(loslib.c.o): In functionos_execute’:
C:\Users\Jez\Documents\PlatformIO\Projects\FullLua/lib\lua/loslib.c:145: undefined reference to `system’
system() is being called from lua which I’m compiling from the lib/ directory.
I’ve tried using these build flags in platformio.ini:
build_flags = -lstdc++ -lsupc++ -lm
platform = espressif32 board = nodemcu-32s framework = arduino
Should I just precompile lua into a static library? Or is there a way to build my project as is?
I’m probably missing something obvious, but anyone could lend me a hand here, I’d really appreciate it!