Hi Jason,
Ideally you'll want to use the exact same version of g++ that was used to compile LabVIEW. For 7.0 on Linux, this was g++-3.1 (so I've been told). I used g++-3.0 (which happened to be on my machine) and it worked okay. This is because exceptions are compiler specific, and the ABI has changed in 3.0 and 3.2.
But, better than that, change your second line to look like this:
g++ -shared -static -module -o libtest.so test.o
Which should fix the problem. I'm not sure if this is the kosher thing to do, but it works for me.
-Duffey