{"id":2746,"date":"2022-08-30T15:27:26","date_gmt":"2022-08-30T15:27:26","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/02\/08\/c-compile-problem-when-using-windows-codegear-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:27:26","modified_gmt":"2022-08-30T15:27:26","slug":"c-compile-problem-when-using-windows-codegear-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/c-compile-problem-when-using-windows-codegear-collection-of-common-programming-errors\/","title":{"rendered":"C++ Compile problem when using Windows &#8211; CodeGear-Collection of common programming errors"},"content":{"rendered":"<p>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<\/p>\n<p>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&#8217;s using CodeGear RAD Studio 2009 &amp; 2010 i was getting a few compile errors which were solved by adding the following header file:<\/p>\n<pre><code>#include \n<\/code><\/pre>\n<p>However now the program does compile but it doesn&#8217;t run, just a blank console. And am getting the following in the CodeGear event&#8217;s log:<\/p>\n<pre><code>Thread Start: Thread ID: 2024. Process Project1.exe (3280)\nProcess Start: C:\\Users\\Carlos\\Documents\\RAD Studio\\Projects\\Debug\\Project1.exe. Base Address: $00400000. Process Project1.exe (3280)\nModule Load: Project1.exe. Has Debug Info. Base Address: $00400000. Process Project1.exe (3280)\nModule Load: ntdll.dll. No Debug Info. Base Address: $77E80000. Process Project1.exe (3280)\nModule Load: KERNEL32.dll. No Debug Info. Base Address: $771C0000. Process Project1.exe (3280)\nModule Load: KERNELBASE.dll. No Debug Info. Base Address: $75FE0000. Process Project1.exe (3280)\nModule Load: cc32100.dll. No Debug Info. Base Address: $32A00000. Process Project1.exe (3280)\nModule Load: USER32.dll. No Debug Info. Base Address: $77980000. Process Project1.exe (3280)\nModule Load: GDI32.dll. No Debug Info. Base Address: $75F50000. Process Project1.exe (3280)\nModule Load: LPK.dll. No Debug Info. Base Address: $75AB0000. Process Project1.exe (3280)\nModule Load: USP10.dll. No Debug Info. Base Address: $76030000. Process Project1.exe (3280)\nModule Load: msvcrt.dll. No Debug Info. Base Address: $776A0000. Process Project1.exe (3280)\nModule Load: ADVAPI32.dll. No Debug Info. Base Address: $777D0000. Process Project1.exe (3280)\nModule Load: SECHOST.dll. No Debug Info. Base Address: $77960000. Process Project1.exe (3280)\nModule Load: RPCRT4.dll. No Debug Info. Base Address: $762F0000. Process Project1.exe (3280)\nModule Load: SspiCli.dll. No Debug Info. Base Address: $759F0000. Process Project1.exe (3280)\nModule Load: CRYPTBASE.dll. No Debug Info. Base Address: $759E0000. Process Project1.exe (3280)\nModule Load: IMM32.dll. No Debug Info. Base Address: $763F0000. Process Project1.exe (3280)\nModule Load: MSCTF.dll. No Debug Info. Base Address: $75AD0000. Process Project1.exe (3280)\n<\/code><\/pre>\n<p>I would really appreciate any help or ideas on how to solve this problem.<\/p>\n<p><strong>P.S:<\/strong> In the case anyone wonders why am I sticking with CodeGear is because is the IDE professors use to evaluate our assignments.<\/p>\n<ol>\n<li>\n<p>I am assuming that you have debugging enabled, and you can&#8217;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&#8217;s constructor code is crashing.<\/p>\n<p>If you do have a global object I.e.<\/p>\n<pre><code>MyClass object;\nint main()\n{ .... };\n<\/code><\/pre>\n<p>Try dynamically allocating it in main().<\/p>\n<pre><code>MyClass *object = 0;\nint main()\n{ object = new MyClass;\n....\n};\n<\/code><\/pre>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2014-02-08 15:51:44. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2746","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2746","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2746"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2746\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2746"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2746"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2746"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}