Borland IDE compiler doesn’t have any libraries

Asked By 70 points N/A Posted on -
qa-featured

 

Hello all experts,

I am new in c/c++, I downloaded Borland IDE compiler and I have installed it successfully now after installing I am facing a problem. It doesn’t have any of the libraries, does anyone know where can I get them?

Please help.

SHARE
Best Answer by Wade S Veith
Answered By 55 points N/A #170602

Borland IDE compiler doesn’t have any libraries

qa-featured

Hello William V Porcaro,

Borland is a best compiler for working in c++ . Mostly it contain all the possible libraries in its full version. But if you do not have then you can download it from the link that is given below. There is also a tutorial that how you can install the library in your Borland compiler so that you can use them in your work.

http://www.trumphurst.com/cpplibs5.html

You can download any library that you want to use in your c++ programs. 

 

Best Answer
Best Answer
Answered By 65 points N/A #170603

Borland IDE compiler doesn’t have any libraries

qa-featured

Hello,

Follow these steps to get library.

1. Start Borland c++ Builder and in the main menu, click File > New > -> Other

2. In the Item Categories list, click c++ Builder Projects.

3. In the right list, click Static Library.

 

 

4. Click OK

5. To save the project, on the Standard toolbar click the Save All button.

6. In the Save Project As dialog box, click the create New Folder button to create a new folder.

7. Type BusMath and press enter twice to display the new folder in the Save combo box.

8. Replace the name of the project with BusinessMath and lick Save.

9. To add a new unit, on the main menu, click File -> New ->Unit – c++ Builder.

10. To save the new unit, on the Standard toolbar, click the save All button.

11. Replace the content of the Name edit box with bmcalc and click Save.

12. In the header file declare the following functions.

//---------------------------------------------------------------------------
#ifndef bmcalcH
#define bmcalcH
//---------------------------------------------------------------------------
double __fastcall Average(const double *Numbers, const int Count);
long   __fastcall GreatestCommonDivisor(long Nbr1, long Nbr2);
//---------------------------------------------------------------------------
#endif

13. In the Source file, implement the function as follows:

//---------------------------------------------------------------------------

#pragma hdrstop

#include "bmcalc.h"

//---------------------------------------------------------------------------

#pragma package(smart_init)
double __fastcall Average(const double *Nbr, const int Total)
{
	double avg, S = 0;

	for(int i = 0; i < Total; i++)
		S += Nbr[i];

	avg = S / Total;
	return avg;
}
//---------------------------------------------------------------------------
long __fastcall GreatestCommonDivisor(long Nbr1, long Nbr2)
{
	while( true )
	{
		Nbr1 = Nbr1 % Nbr2;
		if( Nbr1 == 0 )
			return Nbr2;

		Nbr2 = Nbr2 % Nbr1;
		if( Nbr2 == 0 )
			return Nbr1;
	}
}
//---------------------------------------------------------------------------

14. To create the library, on the main menu, click Project  -> BuildBusinessMath.

15. When the library has been built, click OK in the compiling dialog box.

16. Save all.

Related Questions