Linux Format

Adding libraries

Once you’ve chosen a library for your project, you need to add it to your IDE.

-

In both your compiler settings and the Makefile you can choose where to look for supporting libraries. Your IDE can sometimes write this file for you. However, when you add a framework or library to your project, you have to import it yourself. You usually do this by adding them to your Makefile. In most IDES you have all the standard libraries available by default and then you add your project properties.

Eclipse brings in libraries through your project’s Properties screen, which resembles the settings interface for other common programs. A nice feature is that you can set references to other projects that are in progress.

You set the compiler options for Netbeans in the same way you do in Eclipse, with a neat addition: Pre-build is separate from the other parts of the compile. This makes it easier to control all steps of your compile.

Because Pycharm is especially suited for Python, it has a system for libraries using PYPI, anaconda or even one of your own choice. Qt Creator defines a project file (.pro) where all libraries and other characteri­stics are written. Setting it from the IDE can be done from the Options menu.

Finally, adding libraries in Code::blocks involves going to the project’s Properties screen and set them to be searched by the linker. If you’re creating a C/C++ project then you can use Cmake to create the build directory. There’s even a Cmake GUI available.

With this feature, you can obtain all the values from a single .cbp file. Adding this to your project is vital if your next compile is to be a success.

Newspapers in English

Newspapers from Australia