I currently have the same code working directly in Arduino IDE but i am tring to get it to compile in visual studio as i use this as my primary IDE iam getting following error i am using
arduino 1.8
latest IDF for esp32
latest build for bsec
Linking it all together ...
# Coping cached core C:\Users\Home\AppData\Local\Temp\VMBCore\arduino16x\7af14a94f13cbf1aa099fc9a40549e1d\core.a to C:\Users\Home\AppData\Local\Temp\VMBuilds\MainMod0\expressif_d32_pro\Release\core.a
"C:\Users\Home\Documents\Arduino\hardware\expressif\esp32/tools/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc" -nostdlib "-LC:\Users\Home\Documents\Arduino\hardware\expressif\esp32/tools/sdk/lib" "-LC:\Users\Home\Documents\Arduino\hardware\expressif\esp32/tools/sdk/ld" -T esp32_out.ld -T esp32.project.ld -T esp32.rom.ld -T esp32.peripherals.ld -T esp32.rom.libgcc.ld -T esp32.rom.spiram_incompatible_fns.ld -u ld_include_panic_highint_hdl -u call_user_start_cpu0 -Wl,--gc-sections -Wl,-static -Wl,--undefined=uxTopUsedPriority -u __cxa_guard_dummy -u __cxx_fatal_exception -Wl,--start-group "MainMod0.cpp.o" "ADC.cpp.o" "BME680P.cpp.o" "i2c.cpp.o" "power.cpp.o" "variable.cpp.o" "EEPROM\EEPROM.cpp.o" "bsec\bsec.cpp.o" "bsec\bme680\bme680.c.o" "Wire\Wire.cpp.o" "SPI\SPI.cpp.o" "bme680_data\bme680_data.cpp.o" "bme680_data\bme680\bme680.c.o" "C:\Users\Home\AppData\Local\Temp\VMBuilds\MainMod0\expressif_d32_pro\Release\core.a" -lgcc -lfreertos -lmesh -lod -lwear_levelling -lfb_gfx -lesp_adc_cal -lc_nano -lesp32 -ldriver -lhal -ljsmn -lsmartconfig -lesp_http_server -lprotocomm -lface_recognition -lespnow -ltcpip_adapter -lface_detection -lunity -lc -llibsodium -lesp_http_client -lapp_update -lnewlib -lcxx -ltcp_transport -lm -lefuse -lopenssl -lwifi_provisioning -lespcoredump -llog -lmbedtls -lesp_ringbuf -lwps -lnet80211 -lmqtt -lesp_https_server -lapp_trace -lesp_event -lesp32-camera -lsoc -lheap -llwip -lwpa -lrtc -lxtensa-debug-module -lspi_flash -lphy -lfr -lconsole -lcoap -lbtdm_app -lsdmmc -lfd -lmicro-ecc -ljson -lcore -lprotobuf-c -lethernet -lspiffs -lnvs_flash -lwpa_supplicant -lvfs -lasio -lwpa2 -lpp -lbootloader_support -limage_util -ldl_lib -lulp -lnghttp -lpthread -lfreemodbus -lexpat -lfatfs -lsmartconfig_ack -lmdns -lcoexist -lesp-tls -lesp_https_ota -lbt -lstdc++ -Wl,--end-group -Wl,-EL -o "C:\Users\Home\AppData\Local\Temp\VMBuilds\MainMod0\expressif_d32_pro\Release/MainMod0.ino.elf"
bsec.cpp.o: file not recognized: File truncated
collect2.exe*: error: ld returned 1 exit status
Error linking for board LOLIN D32 PRO
Build failed for project 'MainMod0'