我只有1行代码,并且是这样的:为什么我用这行代码得到缓冲区溢出错误?
pcrecpp::RE re("abc");
函数OnBnClickedButtonGo()
内部。此功能在发布模式下失败,但在调试模式下可以正常工作。
(我使用Visual Studio 8的Windows XP。)
的错误信息是:
A buffer overrun has occurred in testregex.exe which has corrupted the program's
internal state. Press Break to debug the program or Continue to terminate
the program.
For more details please see Help topic 'How to debug Buffer Overrun Issues'.
我怀疑这是它的析构函数,它是无形的,暗示......但我不真的不知道。 PS:我静态链接到PCRE lib版本7.8。 PS2:不太相关,但可能会帮助一些连接到PCRE库时遇到问题的人(需要数小时才能完成):包括行#define PCRE_STATIC
。
你建立了图书馆,还是它是一个罐头库?无论哪种方式,它是用相同的编译器编译的吗?如果没有,我会试着用你的编译器来构建这个库,看看是否有帮助。 – 2008-12-24 00:43:33