Compiling problem

Posted on 2001-06-15
Last Modified: 2010-04-17
I am using C++ Builder 5. When I try to compile my application, the compiler does not stop compiling but goes on and on until the system complains of insufficient memory resources. The number of lines that the compiler says to have compiled are far from the corrcet number of lines in my application. Even if i very small program, when i compile it, the compiler tells me it has compiled thousands of lines which is far from the truth. I have tried reistalling C++ Builder but to no avail. Can you help me out of this.
Question by:gi7mhl

Expert Comment

ID: 6195570
Post a link to this question in C++ area.

Best regards,

Expert Comment

ID: 6195592
Questions, questions...

What kind of application are you building? If you are building a Windows type application, the first compile does usually take a long time.

Have you got the minimum hardware requirements for the compiler?

Have you tried killing off all other programs?

Have you tried freeing up disk space?

What operating system are you running?

Have you tried just compiling your source code on its own?


LVL 24

Expert Comment

ID: 6196871
How much Ram have you? Watch it for a simple "hello world" compile.
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

LVL 22

Expert Comment

ID: 6197634
There are more lines to be compiled. When you add the header files in your project (through #include <X>) then the corresponding .cpp files are also compiled...this will give you a lot of additional lines of code. The first compile usually takes a lot of time because it also has to build a precompiled header file (.pch in visual c++). This file can easily take like 4 MB of memory. Knowing the C++ Builder needs at least 16 MB of RAM memory, and the additional files that need to be created in memory can give you the insufficient memory message. I'm not surprised if you have like 24 or 32 MB of RAM...if you have more (like 48 or 64) it probable works like a charm.


Expert Comment

ID: 6213130
I have Borland C++ Builder 5 Enterprise and let me tell you, it is __slooooow__.  Those thousands and thousands of lines of code are mostly include files (the VCL headers are thousands of lines long, and those don't include the standard headers!!!)

I have a Dual PIII 500, 384MB RAM, 18GB HD, and Builder 5 chunks (takes a few seconds to compile) even on my machine.  If you want to compile things and not waste your money, I suggest that you use the command-line compiler.  Sure, you don't have the big, fancy IDE, but many programmers use Notepad or something similar (I use Notespad instead of Notepad...its freeware and consolidates all my code into one window).  Also, either grab a copy of MSDN Library (the $99 version) or use <>.  I know you probably wanted to develop stuff quickly, but if you only just barely have the hardware necessary, you won't get much use out of it.

(And you will probably pull your hair out now when I say that Borland offers the compiler for free from their website...but don't fear, I've found that specifying what compiler you have in the newsgroups gets a fair amount of attention - especially if you spent the extra to get Enterprise, Pro. will usually do, but I wanted to make sure I got it all ;)  (I think Pro. has the source to the RTL, and it isn't quite free of bugs yet - so it helps to have either Pro. or Ent. :)

Hope that helps!



Expert Comment

ID: 6219438
Any news here? Such as how much RAM?
LVL 24

Expert Comment

ID: 6228009
LVL 54

Expert Comment

ID: 7466814

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - PAQ'd and pts removed
Please leave any comments here within the
next seven days.



Accepted Solution

modulo earned 0 total points
ID: 7505219
Finalized as proposed


Community Support Moderator
Experts Exchange

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now