Cannot include a static library for ESP32

Hello all,

I cannot include a static library “lib_oaq_1st_gen.a”. I get this error when I try to compile :

c:/users/bruce/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r1/bin/…/lib/gcc/xtensa-esp32-elf/8.4.0/…/…/…/…/xtensa-esp32-elf/bin/ld.exe: cannot find -loaq_1st_gen
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\m5stack-core-esp32\firmware.elf] Error 1

in addition, here is my platform.ini :

[env:m5stack-core-esp32]

platform = GitHub - platformio/platform-espressif32: Espressif 32: development platform for PlatformIO

board = m5stack-core-esp32

framework = arduino

build_flags=

-loaq_1st_gen

platform_packages =

platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.0-rc1

Can anyone help to point me in the right direction to solve this issue? Thanks!

I don’t see you adding a -L<location> flag in which you add the folder containing the lib_oaq_1st_gen.a file to the linker search path via build_flags?

I added the -L location. The build_flags looks like :

build_flags=

-L C:\Users\bruce\Documents\PlatformIO\Projects\AirCitizen9\.pio\libdeps\m5stack-core-esp32\Renesas_ZMOD4510_OAQ_1st_Gen_Example\src\esp32 -loaq_1st_gen

The error is still the same.

Please upload a producable version of your project somwhere. How does m5stack-core-esp32 get into .pio\libdeps if there are no lib_deps = .. declarations in the platformio.ini?