0

I have some troubles with Embarcadero C++ Builder XE3. When I run my program, I have an access violation BEFORE the first instruction in the main...So I can't debug, it's very weird.

I used to have this problem a couple of weeks ago : I was forced to full rebuild the entire projet (even if only a comma was missing...) and the violation didn't occurs anymore. I solved it by ckecking the option "Disable incremental link".

I was very happy, but today, the problem is back, and whatever I do, my application crash before enterring in the main ...

Does anyone have an idea ? It's a big project, so I can't really post an exemple because I don't really know what to show...

Thanks a lot

4

1 回答 1

0

可能您在静态全局对象的构造函数中存在错误。这些构造函数都是在进入 之前执行的main(),所以这可以在没有运行时环境或编译器错误的情况下发生。

正如您所说,调试这些很困难,因为您可能不知道哪个类失败了,而且您可能也没有异常信息。

正如您所说,这是一个大型项目,也许您不得不辞职以使用大型项目​​工具包/方法来处理这些问题,例如单元测试精益方法(例如scrum等)。

根据您发布的信息,我认为这是最可以说的。

于 2015-04-16T09:04:00.113 回答