If sdcc is installed without added to PATH, it won't compile.
Error message.
"D:/sdcc/bin/sdcc" -oR:/build/ "R:/test.c"
sdcpp.exe: fatal error: cannot execute 'cc1': CreateProcess: No such file or directory
compilation terminated.
at 1: warning 190: ISO C forbids an empty translation unit
____________________________
This can be solved to add sdcc's bin file in the PATH env, like this:
Error message.
"D:/sdcc/bin/sdcc" -oR:/build/ "R:/test.c"
sdcpp.exe: fatal error: cannot execute 'cc1': CreateProcess: No such file or directory
compilation terminated.
at 1: warning 190: ISO C forbids an empty translation unit
____________________________
This can be solved to add sdcc's bin file in the PATH env, like this:
- Code:
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
if (!cmdDir.isEmpty()) {
QString path = env.value("PATH");
if (path.isEmpty()) {
path = cmdDir;
} else {
path = cmdDir + PATH_SEPARATOR + path;
}
env.insert("PATH",path);
}
env.insert("LANG","en");
env.insert("LDFLAGS","-Wl,--stack,12582912");
env.insert("CFLAGS","");
env.insert("CXXFLAGS","");
process.setProcessEnvironment(env);