is it possible you are not including a lib in release mode?
I have seen this when I forget to copy a dll into debug/release folder for testing.
Try running depends to see if it is related to a dll that can't be found, otherwise start commenting out code until you narrow it down.
Bookmarks