Closed palivoda closed 2 years ago
How did you fix this issue? I have the same problem in Windows 10, platformio powershell. I can access g++ from the command line and not from the PIO powershell.
Unfortunetely I did not found. Maybe you are lucky.
On Wed, 6 Nov 2019 at 13:14, azeemshatp notifications@github.com wrote:
How did you fix this issue? I have the same problem in Windows 10, platformio powershell. I can access g++ from the command line and not from the PIO powershell.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/platformio/platform-native/issues/1?email_source=notifications&email_token=AAFE3LSVQUOWGUHHT5LKEQLQSKRJ7A5CNFSM4EXPLQD2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDGF6SA#issuecomment-550264648, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFE3LWLU7FEQNGRLPBXE33QSKRJ7ANCNFSM4EXPLQDQ .
Please add bin
folder of your local toolchain to system PATH environment variable in OS. For example, C:\\MinGW\\bin
Processing in native environment as i don't hardware [.pio/build/native/test/test.o] Error 1 please guide
Could you share a simple project to reproduce this issue?
Hi, I faced a similar issue and found a simple workaround:
Take a look at
C:\Users\$USERNAME\.platformio\platforms\native\builder\main.py
and add the two lines
import os
os.environ["PATH"] += ";" + r"C:\Program Files\mingw64\bin"
or wherever your mingw64 is located. A clean solution would allow appending $PATH or buildchain-configs via the platformio.ini.
Once that is set up, create a sample test file test/test_main.cpp
with content
#include <unity.h>
void test_setup(void)
{
TEST_ASSERT(true);
}
int main(int argc, char **argv)
{
UNITY_BEGIN();
RUN_TEST(test_setup);
UNITY_END();
return 0;
}
Happy testing!
Hi, @felixplum ,
The proper solution is to add C:\Program Files\mingw64\bin to your system environment PATH variable..
Hey Ivan,
That directory is in the PATH and gcc can be executed outside of the PlatformIO-environment, similarly to OP. See also: https://community.platformio.org/t/g-is-not-recognized/11256/5
I'm using the official IDE with core 5.2.5 under Windows 10.
Please disable suspicious/broken VSCode extensions that break the global system environment.
For Native Environment - run command outputs:
It's Windows 7. PlatformIO 3.5.3a7.
In PowerShell console in Atom it also says the same.
While in command prompt g++ is found. Its in path.
Platformio reinstall does not help.
Can you give me a clue where to dig? :)