souffle-lang/souffle

An exception unhandled in MainDriver.cpp

Mz1z opened this issue · 4 comments

I build this on windows, and throw this exception.
Does here need a try catch?
image

I found the problem! here need add ".exe" to find the real file:
image

I solve the problem like this:

#ifdef _WIN32
inline bool isExecutable(const std::string& name) {
    std::string win_name = name + ".exe";
    return existFile(
            name) || existFile(win_name);  // there is no EXECUTABLE bit on Windows, so theoretically any file may be executable
}
#else

Hi,
Your environment probably does not have the command mcpp or gcc, maybe because you are on Windows.

If your C pre-processor command is neither mcpp nor gcc you can either not use a pre-processor at all (souffle --no-preprocessor) or use the C pre-processor of your choice with souffle --preprocessor "command".

For instance if you want to use mcpp.exe: souffle --preprocessor "mcpp.exe -e utf8 -W0"
Or souffle --preprocessor "cl -nologo -TC -E".

Hi, Your environment probably does not have the command mcpp or gcc, maybe because you are on Windows.

If your C pre-processor command is neither mcpp nor gcc you can either not use a pre-processor at all (souffle --no-preprocessor) or use the C pre-processor of your choice with souffle --preprocessor "command".

For instance if you want to use mcpp.exe: souffle --preprocessor "mcpp.exe -e utf8 -W0" Or souffle --preprocessor "cl -nologo -TC -E".

,Thank you for your reply. I have gcc in my environment, and I debugged this function, it really need to add ".exe" to the end of the path.