Hello, I'm now working on an IDE written by Qt, But I get some strange stucks now...
I want to compile a cpp file using MinGW. I got the path of g++.exe. I want to execute the command like this:
g++ D:\a.cpp -static -o D:\a.exe
g++ D:\a.cpp -static -o D:\a.exe
To copy to clipboard, switch view to plain text mode
So I write the code following:
arg<<filePath<<"-static"<<"-o"<<fileInfo.absolutePath()+"/"+fileInfo.completeBaseName()+".exe";
gccCompile->start(gccPath, arg)
QProcess *gccCompile=new QProcess(this);
QStringList arg;
arg<<filePath<<"-static"<<"-o"<<fileInfo.absolutePath()+"/"+fileInfo.completeBaseName()+".exe";
gccCompile->start(gccPath, arg)
To copy to clipboard, switch view to plain text mode
All the QStrings in arg are correct, I've been checked by qDebug();
The file compiles successfully, but I find out that there isn't any new exe file in the folder. g++.exe has been launched successfully(I find this by taskmgr).
My friends test this on his Ubuntu 13, he said that there's nothing wrong! This is what actaully shocked me.
What's wrong with my code? I'm using Qt 5.1 Beta, and he is using Qt 5.0. Is this a bug on Qt 5.1 Beta?
Bookmarks