platform-native icon indicating copy to clipboard operation
platform-native copied to clipboard

“archive has no index” error when unit testing on native with Mingw-w64

Open robmaxtech opened this issue 2 years ago • 2 comments

With a unit testing project as native test using MinGW64, installed as in the doc, I encountered a mingw32/bin/ld.exe: .pio\build\native.... .a: error adding symbols: archive has no index; run ranlib to add one error message. Via this post I found that MinGW 13.2 seems to be the reason for the problem; after downgrading to MinGW 12.2.0.03042023 solved the issue. (installation via chocolatey; I assume it works also with other installation ways) Maybe this should be mentioned in the doc.

robmaxtech avatar Dec 13 '23 15:12 robmaxtech

I use 13.2 and MinGW 12.2.0.the same problem

erwzqsdsdsf avatar Oct 31 '24 05:10 erwzqsdsdsf

I found the cause of the problem. It was because there was other software, on the path , high priority, MinGW , other software installed.

The solution is to run the “ar” command from the vsc command line, which prints out it‘s path.

Then remove the high priority ar from the path. reboot pc

erwzqsdsdsf avatar Oct 31 '24 08:10 erwzqsdsdsf