C++ Compile problem when using Windows – CodeGear-Collection of common programming errors
This is a follow-up question to this one i made earlier. Btw thanks Neil Butterworth for you help http://stackoverflow.com/questions/2461977/problem-compiling-c-in-codegear
A quick recap. Im currently developing a C++ program for university, I used Netbeans 6.8 on my personal computer (Mac) and all works perfect. When I try them on my windows partition or at the university PC’s using CodeGear RAD Studio 2009 & 2010 i was getting a few compile errors which were solved by adding the following header file:
#include
However now the program does compile but it doesn’t run, just a blank console. And am getting the following in the CodeGear event’s log:
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)
I would really appreciate any help or ideas on how to solve this problem.
P.S: In the case anyone wonders why am I sticking with CodeGear is because is the IDE professors use to evaluate our assignments.
-
I am assuming that you have debugging enabled, and you can’t even step into main() with the debugger (Pressing [F7] or [F8]), like the program is crashing before it even gets into main. This could be a problem if you have a global (or static) instance of an object, and the object’s constructor code is crashing.
If you do have a global object I.e.
MyClass object; int main() { .... };
Try dynamically allocating it in main().
MyClass *object = 0; int main() { object = new MyClass; .... };