The file doesn't matter, as far as it have some compiler/linker problem or it be in a path with spaces.
You sure you want me to add
#include <dos.h>
int main()
{
outportb(0x378, 1);
return 0;
}
to SF?
It should say that dos.h doesn't exist and couldn't find outportb when linking.
Ok, for your consideration, quick fix which seems to be working:
plugins/compilergcc/compilergcc.cpp line 152 from:
to:
I finally found the problem in there is the index never got updated so it tried to access an array at position -1.
Now, about the paths with spaces, I made this workaround (you're the ones who really know the code so it could be done somewhere else in a nicer way):
plugins/compilergcc/directcommands.cpp starting on line 269 from:
wxString o_filename = fname.GetFullPath();
fname.SetExt(EXECUTABLE_EXT);
wxString exe_filename = fname.GetFullPath();
MakefileGenerator mg(m_pCompilerPlugin, 0, "", 0); // don't worry! we just need a couple of utility funcs from it
wxString compilerCmd = mg.CreateSingleFileCompileCmd(ctCompileObjectCmd,
0,
0,
filename,
o_filename,
wxEmptyString);
to:
wxString o_filename = '"' + fname.GetFullPath() + '"';
fname.SetExt(EXECUTABLE_EXT);
wxString exe_filename = '"' + fname.GetFullPath() + '"';
wxString i_filename = '"' + filename + '"';
MakefileGenerator mg(m_pCompilerPlugin, 0, "", 0); // don't worry! we just need a couple of utility funcs from it
wxString compilerCmd = mg.CreateSingleFileCompileCmd(ctCompileObjectCmd,
0,
0,
i_filename,
o_filename,
wxEmptyString);
plugins/compilergcc/makefilegenerator.cpp starting on line 218 from:
wxFileName fname(object);
to:
wxString object_unquoted(object);
if (!object_unquoted.IsEmpty() && object_unquoted[0] == '"')
{
object_unquoted.Replace("\"", "");
}
wxFileName fname(object_unquoted);
I hope it be of any use.