Solved

Compiling problem

Posted on 2001-06-15
9
204 Views
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.
0
Comment
Question by:gi7mhl
9 Comments
 
LVL 4

Expert Comment

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

Best regards,
PRASHANT.
0
 
LVL 4

Expert Comment

by:rd707
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?

rd707

0
 
LVL 24

Expert Comment

by:SunBow
ID: 6196871
How much Ram have you? Watch it for a simple "hello world" compile.
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 22

Expert Comment

by:CJ_S
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.

Regards,
CJ
0
 

Expert Comment

by:MacTruck
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 <http://msdn.microsoft.com/library/default.asp>.  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!

MacTruck

0
 
LVL 4

Expert Comment

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

Expert Comment

by:SunBow
ID: 6228009
done?
0
 
LVL 54

Expert Comment

by:nico5038
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.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 7505219
Finalized as proposed

modulo

Community Support Moderator
Experts Exchange
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Change the background and font colors in Notepad++ 5 112
Programming Codes 2 21
AvlTree-Node Data type 4 14
Why is initMap returning "not a function" error. 3 27
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
A short article about problems I had with the new location API and permissions in Marshmallow

856 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