我找到了解决方法。在索引中。gpp插件的js,更改
const options = (file.path + ' -o ' + compiledPath + ' ' + atom.config.get('gpp.compilerOptions')).replace(/[\s{2,}]+/g, ' ').trim();
path.join(filePath.dir, filePath.name);
console.log(options.split(' '));
const child = child_process.spawn('g++', options.split(' '), {
cwd: filePath.dir
});
到
const options = atom.config.get('gpp.compilerOptions').replace(/[\s{2,}]+/g, ' ').trim();
path.join(filePath.dir, filePath.name);
var new_options = [file.path,'-o',compiledPath]
if (options != ""){
new_options = new_options.concat(options.split(' '));
}
const child = child_process.spawn('g++', new_options, {
cwd: filePath.dir
});