Compilation error Win 11 and IDE 2,04

Whilst uploading the blink sketch (Windows 11) (IDE 2,04) I get the error message Compilation error exit status 0xc0000135. This is also the message I get with the Fade Sketch. I have tried using the Uno and Nano with the same results. No other code or message appears.
Using these these same boards on my older lap top (Windows 10 ) (IDE 1.8.19) the sketches upload with no problems.
Any assistance and advice would be very much appreciated.

I've moved your topic to the dedicated IDE 2.0 section on the forum.

Please enable verbose output during compilation AND verbose output during upload under File → Preferences, perform the upload and copy/paste the complete output here.

// Edit
The only thing I could find is

But that does not ring any bells :frowning:

Hi @mkldwg. I'm going to ask you to post some additional information that might help us to identify the problem.


:exclamation: NOTE: These instructions will not solve the problem. They are only intended to gather more information which might provide a clue that eventually leads to a solution.


Please do this:

  1. Select File > Preferences from the Arduino IDE menus.
  2. Check the box next to "Show verbose output during: ☐ compilation".
  3. Click the OK button.
  4. Select Sketch > Verify/Compile from the Arduino IDE menus.
  5. Wait for the compilation to fail.
  6. You will see a "Compilation error: ..." notification at the bottom right corner of the Arduino IDE window. Click the COPY ERROR MESSAGES button on that notification.
  7. Open a forum reply here by clicking the Reply button.
  8. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code tags icon on toolbar
  9. Press Ctrl+V.
    This will paste the compilation output into the code block.
  10. Move the cursor outside of the code tags before you add any additional text to your reply.
  11. Click the Reply button to post the output.

In case the output is longer than the forum software will allow to be added to a post, you can instead save it to a .txt file and then attach that file to a reply here:

  1. Open any text editor program.
  2. Paste the copied output into the text editor.
  3. Save the file in .txt format.
  4. Open a forum reply here by clicking the Reply button.
  5. Click the "Upload" icon (Upload icon) on the post composer toolbar:
    Upload icon on toolbar
  6. Select the .txt file you saved.
  7. Click the Open button.
  8. Click the Reply button to publish the post.

Alternatively, instead of using the "Upload" icon on the post composer toolbar as described in steps (5) - (7) above, you can simply drag and drop the .txt file onto the post composer field to attach it.

FQBN: arduino:avr:uno
Using board 'uno' from platform in folder: C:\Users\SMLud\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6
Using core 'arduino' from platform in folder: C:\Users\SMLud\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Detecting libraries used...
"C:\\Users\\SMLud\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\SMLud\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\SMLud\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\SMLud\\AppData\\Local\\Temp\\arduino\\sketches\\314E7E1CF38C996649093850981751F4\\sketch\\Fade.ino.cpp" -o nul
Error while detecting libraries included by C:\Users\SMLud\AppData\Local\Temp\arduino\sketches\314E7E1CF38C996649093850981751F4\sketch\Fade.ino.cpp
Generating function prototypes...
"C:\\Users\\SMLud\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\SMLud\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\SMLud\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\SMLud\\AppData\\Local\\Temp\\arduino\\sketches\\314E7E1CF38C996649093850981751F4\\sketch\\Fade.ino.cpp" -o "C:\\Users\\SMLud\\AppData\\Local\\Temp\\arduino\\sketches\\314E7E1CF38C996649093850981751F4\\preproc\\ctags_target_for_gcc_minus_e.cpp"

exit status 0xc0000135

Compilation error: exit status 0xc0000135

FQBN: arduino:avr:uno

Using board 'uno' from platform in folder: C:\Users\SMLud\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Using core 'arduino' from platform in folder: C:\Users\SMLud\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6

Detecting libraries used...

"C:\Users\SMLud\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\SMLud\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino" "-IC:\Users\SMLud\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard" "C:\Users\SMLud\AppData\Local\Temp\arduino\sketches\314E7E1CF38C996649093850981751F4\sketch\Fade.ino.cpp" -o nul

Error while detecting libraries included by C:\Users\SMLud\AppData\Local\Temp\arduino\sketches\314E7E1CF38C996649093850981751F4\sketch\Fade.ino.cpp

Generating function prototypes...

"C:\Users\SMLud\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\Users\SMLud\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\cores\arduino" "-IC:\Users\SMLud\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\variants\standard" "C:\Users\SMLud\AppData\Local\Temp\arduino\sketches\314E7E1CF38C996649093850981751F4\sketch\Fade.ino.cpp" -o "C:\Users\SMLud\AppData\Local\Temp\arduino\sketches\314E7E1CF38C996649093850981751F4\preproc\ctags_target_for_gcc_minus_e.cpp"

exit status 0xc0000135

Compilation error: exit status 0xc0000135

Thanks! Please try running the command that errors from a Windows PowerShell terminal. I'll provide instructions:

  1. Copy the following command:
    & "C:\\Users\\SMLud\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Users\\SMLud\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\cores\\arduino" "-IC:\\Users\\SMLud\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.6\\variants\\standard" "C:\\Users\\SMLud\\AppData\\Local\\Temp\\arduino\\sketches\\314E7E1CF38C996649093850981751F4\\sketch\\Fade.ino.cpp" -o "C:\\Users\\SMLud\\AppData\\Local\\Temp\\arduino\\sketches\\314E7E1CF38C996649093850981751F4\\preproc\\ctags_target_for_gcc_minus_e.cpp"
    
  2. Click the Windows "Start" button.
  3. Type powershell in the search field.
  4. Select "Windows PowerShell ISE" from the search results.
    A "Windows PowerShell ISE" window will open.
  5. Click on the terminal panel of the "Windows PowerShell ISE" window.
    The terminal panel is the part that has the command prompt like PS C:\Users\per>
  6. Press Ctrl+V.
    This will paste the copied command into the PowerShell terminal.
  7. Press the Enter key.

The result I expect is that the command will fail and a dialog will appear that contains an error message that is more informative than the cryptic exit status 0xc0000135 shown by Arduino IDE.

Please reply here to let us know what was the result. If you get any error messages, please post the full and exact text of the error message. Hopefully that information might give us a clue about how you can solve this problem.

Sorry for the delay responding. Had a stay in Hospital. The message box reads avr-g++.exe-system error

The code execution cannot proceed because libwinpthread-1.dll was not found. reinstalling the program may fix this problem.

hope this helps

I'm sorry to hear that. I hope you are feeling better now.

The experiment did indeed produce some better information. Unfortunately I'm not sure how to interpret this. The solution would be clear if that DLL was missing, but I see it is included in the avr-gcc installation.

Please follow these instructions to check whether the file is present at this path:

Thanks! Please try running the command that errors from a Windows PowerShell terminal. I'll provide instructions:

  1. Copy the following command:
    dir "C:\\Users\\SMLud\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\7.3.0-atmel3.6.1-arduino7/bin/libwinpthread-1.dll"
    
  2. Click the Windows "Start" button.
  3. Type powershell in the search field.
  4. Select "Windows PowerShell ISE" from the search results.
    A "Windows PowerShell ISE" window will open.
  5. Click on the terminal panel of the "Windows PowerShell ISE" window.
    The terminal panel is the part that has the command prompt like PS C:\Users\per>
  6. Press Ctrl+V.
    This will paste the copied command into the PowerShell terminal.
  7. Press the Enter key.

Please reply here to tell us what sort of output is produced by that procedure.

If the DLL is present as it is on my system, the command will produce output like this:

    Directory: C:\Users\SMLud\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\bin


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----        2022-07-14     23:09          51694 libwinpthread-1.dll

But if the DLL is missing as the error message claims, it will instead produce output like this:

dir : Cannot find path 'C:\Users\SMLud\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\b
in\libwinpthread-1.dlld' because it does not exist.
At line:1 char:1
+ dir "C:\Users\SMLud\AppData\Local\Arduino15\packages\arduino\tools\avr- ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\per\Ap...npthread-1.dlld:String) [Get-ChildItem], ItemNotFound
   Exception
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand

Good morning ptillisch,

The following is the information shown in the window.

PS C:\Users\SMLud> 2. dir "C:\Users\SMLud\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7/bin/libwinpthread-1.dll"

At line:1 char:4

    1. dir "C:\Users\SMLud\AppData\Local\Arduino15\packages\ard ...
  • 
    

Unexpected token 'dir' in expression or statement.

  • CategoryInfo : ParserError: (:slight_smile: [], ParentContainsErrorRecordException

  • FullyQualifiedErrorId : UnexpectedToken

PS C:\Users\SMLud>

Many thanks for you assistance so far

Mile

Good morning. It looks like you added a "2. " to the start of the command. Try it again with this exact command:

dir "C:\Users\SMLud\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\bin\libwinpthread-1.dll"

This is the result of the re-try.

PS C:\Users\SMLud> dir "C:\Users\SMLud\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\bin\libwinpthread-1.dll"

dir : Cannot find path 'C:\Users\SMLud\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\bin\libwinpthread-1.dll' because it does not

exist.

At line:1 char:1

  • dir "C:\Users\SMLud\AppData\Local\Arduino15\packages\arduino\tools\av ...

  • 
    
  • CategoryInfo : ObjectNotFound: (C:\Users\SMLud...inpthread-1.dll:String) [Get-ChildItem], ItemNotFoundException

  • FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand

PS C:\Users\SMLud>

Regards

Mike

Very interesting! This result indicates the DLL went missing somehow. The next thing I will suggest you try is uninstalling and then reinstalling the "Arduino AVR Boards" platform. That should cause avr-gcc to be reinstalled and hopefully this time around the installation will include the DLL.

I'll provide instructions:

  1. Select Tools > Board > Boards Manager from the Arduino IDE menus to open the "Boards Manager" view in the left side panel.
  2. Scroll down through the list of boards platforms until you see the "Arduino AVR Boards" entry.
  3. Click the "REMOVE" button.
  4. A confirmation dialog will now appear. Click the "YES" button.
  5. Wait for the uninstallation to finish.
  6. Click the "INSTALL" button at the bottom of the "Arduino AVR Boards" entry.
  7. Wait for the installation to finish.

Now try uploading your sketch again. Hopefully this time the "exit status 0xc0000135" error will not occur.

You’re a genius. All seems to be working okay now.

Thanks for your patience it is appreciated.

Kind regards

Mike

You are welcome. I'm glad it is working now.

Regards,
Per

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.