Would you like to react to this message? Create an account in a few clicks or log in to continue.

You are not connected. Please login or register

T1751_SDCC failed to compile in windows if it's not in the PATH.

Go down  Message [Page 1 of 1]

royqh1979



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:

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);

Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum