Does this error occur in all programs or just in this particular one? If you compile a simple hello world sample or one of the NX samples like adsamp using the directive INITCALL"CBL_DEBUGBREAK" do you get the same error?
The latest wrappack for NX 5.1 is wrappack 12. I would suggest that you install this version over the wrappack 6 version and see if you still get the same error.