PlatformIO Community

How to compile Azure SDK for C in PlatformIO?

Hello,

I am curious if anybody has been able to run a recent version of Azure SDK for C samples with Platformio.
I have been able to compile and run using Arduino IDE but not Platformio.

Details::

When I try to compile I got this error:

c:/users/alexandre/.platformio/packages/toolchain-xtensa-esp32/bin/…/lib/gcc/xtensa-esp32-elf/8.4.0/…/…/…/…/xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32doit-devkit-v1\libFrameworkArduino.a(main.cpp.o):(.literal._Z8loopTaskPv+0x8): undefined reference to setup()' c:/users/alexandre/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32doit-devkit-v1\libFrameworkArduino.a(main.cpp.o):(.literal._Z8loopTaskPv+0xc): undefined reference to loop()’
c:/users/alexandre/.platformio/packages/toolchain-xtensa-esp32/bin/…/lib/gcc/xtensa-esp32-elf/8.4.0/…/…/…/…/xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32doit-devkit-v1\libFrameworkArduino.a(main.cpp.o): in function loopTask(void*)': C:/Users/Alexandre/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:42: undefined reference to setup()’
c:/users/alexandre/.platformio/packages/toolchain-xtensa-esp32/bin/…/lib/gcc/xtensa-esp32-elf/8.4.0/…/…/…/…/xtensa-esp32-elf/bin/ld.exe: C:/Users/Alexandre/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:48: undefined reference to `loop()’
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\esp32doit-devkit-v1\firmware.elf] Error 1
=========================================================================== [FAILED] Took 56.36 seconds ===========================================================================

If you run with framework = arduino, there has to be a setup() and loop() function, defined in C++ code, somewhere. Can you upload the whole project you’re trying to compil so that we can verify this?