These are my code environments, and I don’t know where the error is, here is the error message below
The number 3221225781 is 0xc0000135 which is the error code for STATUS_DLL_NOT_FOUND
. This usually means that a DLL that an EXE needs is not found.
But this is weird. When it fails in the “Archiving” step, that’s done with sdar
and sdranlib
sdar rc .pio\build\STC89C52RC\libf32\libtools.lib .pio\build\STC89C52RC\libf32\tools\tools.rel
sdranlib .pio\build\STC89C52RC\libf32\libtools.lib
And these executables don’t have any DLL dependencies exact for the regular Windows ones.
>dumpbin /dependents C:\Users\Max\.platformio\packages\toolchain-sdcc\bin\sdranlib.exe
Microsoft (R) COFF/PE Dumper Version 14.41.34120.0
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file C:\Users\Max\.platformio\packages\toolchain-sdcc\bin\sdranlib.exe
File Type: EXECUTABLE IMAGE
Image has the following dependencies:
KERNEL32.dll
msvcrt.dll
USER32.dll
Can you upload the project as a whole to Github so that I can reproduce the problem?
my github
very simple a few files, because just started learning
Can you please add this to your repository under the path
.github/workflows/build.yml
with
name: PlatformIO CI
on: [push]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: Build PlatformIO Project
run: cd c51_project && pio run
This uses Github Actions to create a Windows machine to try to compile the project. If that succeeds, there is something wrong with your specific machine. If not, it’s a general bug.
You can then check the results in the “Actions” tab in the Github repository.
See https://docs.platformio.org/en/latest/integration/ci/github-actions.html.
Sorry, since you created a non-standard folder structure with the PlatformIO project being actually inside the c51_project
folder instead of the root, there is an additional cd c51_project
needed. I have updated the text above, please update.
Can you use this build.yml
file instead, it will try both Ubuntu (Linux) and Windows.
name: PlatformIO CI
on: [push]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: Run PlatformIO
run: cd c51_project && pio run
The ubuntu build succeeded, but the windows build still failed,Do I need to use a virtual environment to build my project now?
@maxgerhardt Are you there, very sorry to bother you, can this problem only be solved with a virtual environment?
Note that Ubuntu uses SDCC toolchain 4.1.0 while Windows uses 4.4.0
You can try adding into the platformio.ini
:
; force toolchain 4.1.0
platform_packages =
toolchain-sdcc@~1.40100.0
and build again on Windows. (see available versions).
If that doesn’t solve it, please file an issue into GitHub · Where software is built, linking them your test repository. They can do further tests and toolchain updates.