Immunity Error "probably not a 32-Bit Portable Executable" when compiled with g++

I am working through the Pentatration Testing: System Security course and I am on the buffer overflow goodpwd exercise. my immunity debugger cant load my compiled goodpwd.exe and it appears b/c it was compiled using g++, when i compile it with gcc and add a flag -lstdc++ at the end, it works. I know that different compilers make slightly different code, but if i run a file command in linux on the g++ compiled executable, i get a 32 bit PE, and that is what immunity is telling me the file is not and why it is unable to load. Any thoughts here?