That's an extremely useful reply indeed. Thanks for those links. It seems alot of extra 'manual' work has to be done here to get it to run on the GCC compilers.
I tried this:
Code:
__try {
// function...... and a load of instructions
}
__except(EXCEPTION_EXECUTE_HANDLER) { // aborts execution in try block and jumps to this
if (_exception_code() == STATUS_ILLEGAL_INSTRUCTION)
return info; // cpu inactive
return info; // unexpected exception occurred
}
__end_except // this extra line is required by the libseh stuff
Ok great so I added the required libseh stuff to the project and got no errors relating to files not found for it. Wasn't too bad to be honest just had to add a header to the project and include the __end_except line. Fine.
But now my compiler is complaining about this:
|85|error: expected 'catch' before '{' token|
And alot of other errors. I'm fairly sure I know what those other errors are but I don't want to ask too much at the moment or I'll confuse the thread. For now it seems my compiler is recognising the __try function but it is not happy about seeing the __except part it seems to expect to see the catch keyword instead. Is there any way around this? All the guy who wrote this code seems to want to do is run a block of code, and run a special block of code afterwards if something failed.
Can this be re-written in a more simple way or is there some way I can get my compiler to be happy about this __except keyword?