PlatformIO on Linux (AArch64)


At first, I suceeded to build C++ code with VS Code + PlatformIO on Mac.
I used Mr.Pharap’s Scripts.

Thank you for members of Pokitto community.

Next, I copied files to Linux(AArch64) and build with PlatformIO (no VS Code).
But it causes an error like this:

.pioenvs/pokitto/FrameworkMbed/platform/mbed_sdk_boot.o: In function __wrap_main': /home/(My User Name)/.platformio/packages/framework-mbed/platform/mbed_sdk_boot.c:102: undefined reference tomain’
collect2: error: ld returned 1 exit status
*** [.pioenvs/pokitto/firmware.elf] Error 1
================================================= [ERROR] Took 101.01 seconds

Any tips?

P.S. To be exact, Linux(AArch64) is chroot Debian installed on Android by UserLAnd app.
I like this eccentric environment to develop game.
Perhaps I have written more than 80% of codes on Android smartphone with keyboard to develop my Arduboy games.


‘undefined reference to main’ means main hasn’t been defined,
which probably means the .cpp/.c file that main is defined in hasn’t been compiled.
So the .cpp/.c file that defined main probably isn’t being included in the list of files to be compiled for some reason.


Thank you!
I’ll try by myself for a while.

Perhaps I made stupid mistakes.


It seems that line 102 should be calling __real_main rather than main:

I found someone with a similar problem:

They say that:

if I set the Debug configuration changing optimisations to optimize for size and change the debugging options to none the project is correctly built. So seems to me that the error I found is related how I compile my project