How to check if a library is installed?

To do this in a distro-independent* fashion you can use ldconfig with grep, like this: ldconfig -p | grep libjpeg If libjpeg is not installed, there will be no output. If it is installed, you will get a line for each version available. Replace libjpeg by any library you want, and you have a generic, … Read more

What is index.js used for in node.js projects?

When you pass a folder to Node’s require(), it will check for a package.json for an endpoint. If that isn’t defined, it checks for index.js, and finally index.node (a c++ extension format). So the index.js is most likely the entry point for requiring a module. See the official Docs here: http://nodejs.org/api/modules.html#modules_folders_as_modules. Also, you ask how to … Read more

libstdc++-6.dll not found

If you are using MingW to compile C++ code on Windows, you may like to add the options -static-libgcc and -static-libstdc++ to link the C and C++ standard libraries statically and thus remove the need to carry around any separate copies of those. Version management of libraries is a pain in Windows, so I’ve found this approach the quickest … Read more

What is the difference between a framework and a library?

A library performs specific, well-defined operations. A framework is a skeleton where the application defines the “meat” of the operation by filling out the skeleton. The skeleton still has code to link up the parts but the most important work is done by the application. Examples of libraries: Network protocols, compression, image manipulation, string utilities, regular expression evaluation, math. Operations … Read more