platformio / platform-native

Native: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/native
Apache License 2.0
21 stars 27 forks source link

Do not know how to make File target `exec' #21

Open kennybytes opened 2 years ago

kennybytes commented 2 years ago

I get the following error trying to run pio run --target exec (as described in the docs):

$ ~/platform-native/examples/hello-world$ pio run --target exec
Processing native (platform: native)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
*** Do not know how to make File target `exec' (/home/kluong/platform-native/examples/hello-world/exec).  Stop.
========================================================================== [FAILED] Took 0.27 seconds ==========================================================================

Here is the version I'm using:

$ ~/platform-native/examples/hello-world$ pio --version
PlatformIO Core, version 6.1.4
MacDada commented 1 year ago

Paste your platformio.ini.

BTW, https://community.platformio.org/

fbx71 commented 1 year ago

Hi, I had the same problem. The native package is separately managed in HOME folder and might be outdated.

Just run pio pkg update within the folder that contains native in platformio.ini.

Example output:

pio pkg update
Resolving native dependencies...
Platform Manager: Updating native @ 1.1.4
Platform Manager: Removing native @ 1.1.4
Platform Manager: native@1.1.4 has been removed!
Platform Manager: Installing platformio/native @ 1.2.1
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Platform Manager: native@1.2.1 has been installed!