繁体   English   中英

C ++ Builder编译问题

[英]C++Builder compile issue

这是我之前提出的问题的后续问题。 顺便说一句,感谢尼尔·巴特沃思(Neil Butterworth)的帮助在c ++ builder中发布c ++


快速回顾。 我目前正在为大学开发C ++程序,我在个人计算机(Mac)上使用了Netbeans 6.8,并且一切正常。 当我在Windows分区或使用C ++ Builder 2009和2010的大学PC上尝试它们时,遇到了一些编译错误,这些错误通过添加以下头文件来解决:

#include <string>

但是现在程序可以编译了,但是没有运行,只是一个空白的控制台。 并且正在编译器的事件日志中获得以下内容:

Thread Start: Thread ID: 2024. Process Project1.exe (3280)
Process Start: C:\Users\Carlos\Documents\RAD Studio\Projects\Debug\Project1.exe. Base Address: $00400000. Process Project1.exe (3280)
Module Load: Project1.exe. Has Debug Info. Base Address: $00400000. Process Project1.exe (3280)
Module Load: ntdll.dll. No Debug Info. Base Address: $77E80000. Process Project1.exe (3280)
Module Load: KERNEL32.dll. No Debug Info. Base Address: $771C0000. Process Project1.exe (3280)
Module Load: KERNELBASE.dll. No Debug Info. Base Address: $75FE0000. Process Project1.exe (3280)
Module Load: cc32100.dll. No Debug Info. Base Address: $32A00000. Process Project1.exe (3280)
Module Load: USER32.dll. No Debug Info. Base Address: $77980000. Process Project1.exe (3280)
Module Load: GDI32.dll. No Debug Info. Base Address: $75F50000. Process Project1.exe (3280)
Module Load: LPK.dll. No Debug Info. Base Address: $75AB0000. Process Project1.exe (3280)
Module Load: USP10.dll. No Debug Info. Base Address: $76030000. Process Project1.exe (3280)
Module Load: msvcrt.dll. No Debug Info. Base Address: $776A0000. Process Project1.exe (3280)
Module Load: ADVAPI32.dll. No Debug Info. Base Address: $777D0000. Process Project1.exe (3280)
Module Load: SECHOST.dll. No Debug Info. Base Address: $77960000. Process Project1.exe (3280)
Module Load: RPCRT4.dll. No Debug Info. Base Address: $762F0000. Process Project1.exe (3280)
Module Load: SspiCli.dll. No Debug Info. Base Address: $759F0000. Process Project1.exe (3280)
Module Load: CRYPTBASE.dll. No Debug Info. Base Address: $759E0000. Process Project1.exe (3280)
Module Load: IMM32.dll. No Debug Info. Base Address: $763F0000. Process Project1.exe (3280)
Module Load: MSCTF.dll. No Debug Info. Base Address: $75AD0000. Process Project1.exe (3280)

对于解决此问题的任何帮助或想法,我将不胜感激。

PS:如果有人想知道为什么我坚持使用C ++ Builder是因为IDE教授用来评估我们的作业。

我假设您已启用调试功能,并且您甚至无法使用调试器(按[F7]或[F8])进入main(),就像程序在进入main之前崩溃一样。 如果您有一个对象的全局(或静态)实例,并且该对象的构造函数代码崩溃,则可能会出现问题。

如果您有全局对象,即

MyClass object;
int main()
{ .... };

尝试在main()中动态分配它。

MyClass *object = 0;
int main()
{ object = new MyClass;
....
};

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM