Questions tagged [libraries]

Use this tag for questions about software libraries. This tag is NOT for questions about computer programs used in public lending libraries or other brick-and-mortar libraries. Questions asking us to recommend or find a library are off-topic.

A library is a collection of non-volatile resources used by programs on a computer, often to develop software.

Libraries contain code and data that provide services to independent programs. This encourages the sharing and changing of code and data in a modular fashion, and eases the distribution of the code and data. Library files are not executable programs. They are either static libraries that are merged with an executable when the executable is being compiled and linked, making them "statically linked", or they are dynamic libraries that are loaded by a dynamic linker while the executable is running, making them "dynamically linked". The dynamic linker may also allow an application to explicitly request that a module be loaded and to obtain references to routines in the module; this can be used to implement plug-ins.

The above was taken from the Wikipedia entry Library (computing).


Questions asking us to recommend or find a library, documentation or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam.

3395 questions
16
votes
1 answer

Global mutable HashMap in a library

I want to have an extendable dictionary linking together Object with a &'static str inside my library. HashMap seems like the right data structure for this, but how do I make it global, initialised on declaration and mutable? So something like…
andrey
  • 1,515
  • 5
  • 23
  • 39
16
votes
1 answer

LGPL-like license for a header-only C++ library

My understanding is that a program can link dynamically to an LGPL library and include its headers, possibly with modifications, without the program having to be released under the LGPL, but any modifications to the source code that goes into…
HighCommander4
  • 50,428
  • 24
  • 122
  • 194
15
votes
6 answers

Add a folder structure to a Visual Studio Solution

Is it possible to add a folder structure to Solution Items without manually adding each level of the tree? We have a multi project solution which requires several third-party libraries, at least one of which has a multi-layer tree. We have a libs…
15
votes
3 answers

Package is missing dependencies for libraries - OpenWRT

I am trying to compile OpenWRT with a custom package I have made inside it. Here is the OpenWRT Makefile for my package: # # Copyright (C) 2008 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE…
TomSelleck
  • 6,706
  • 22
  • 82
  • 151
15
votes
2 answers

How to compile library on C using GCC?

I made a library with the files pila.h and pila.c. I compile the file pila.c with gcc pila.c -c and this library works fine. I have tested it. Then I made another library. This library has the files pila_funciones_extra.h and pila_funciones_extra.c.…
Adrian
  • 829
  • 5
  • 14
  • 21
15
votes
3 answers

GCC unable to find header file in a included library

I am trying to include a library file named libmathematica.a in gcc so it gets linked in the executable example. I attempt to do this with gcc main.c libmathematica.a -o example Note: I have to do this with gcc, as ld won't link it properly with the…
Corwin Mcknight
  • 302
  • 1
  • 2
  • 9
15
votes
4 answers

How to remove a dependency from my Android project in Eclipse

When I highlight my project, go to properties, select java build path and then try to remove an Android Dependency from my list of Android dependencies the remove button is grey'd out. How can I remove that specific dependency?
jimbob
  • 3,288
  • 11
  • 45
  • 70
14
votes
5 answers

We're sorry, a server error occurred while reading from storage. Error code NOT_FOUND

I'm facing this issue while I'm running the script. one day before if was working fine for me. I did clear all the cache of chrome browser and I tried another laptop also but the issue is as it is. please help me to resolve the issue. The code I'm…
14
votes
5 answers

Is there a library repository for C?

Possible Duplicate: Why there is not a comprehensive c archive network? Everyone knows that C is very small language, it has just language primitives and almost no standard library (no data structures or algorithms). Therefore I have a question,…
bodacydo
  • 75,521
  • 93
  • 229
  • 319
14
votes
7 answers

Why there is not a comprehensive c archive network?

There are websites as collections of python/perl/R libraries. Why there is not an equivalent one for c? I searched the internet and only found a small website calling itself CCAN. There are only a few libraries in that website. If I need extra…
Feng Jiang
  • 1,776
  • 19
  • 25
14
votes
1 answer

android studio cannot resolve import org.json.JSONObject

I used libgdx to build my project and I am having issues using the JSONObject class. When I add import org.json.JSONObject, it says it cannot resolve. How do I add that library to my project? Here is what I have tried without success: I downloaded…
Markoh
  • 247
  • 1
  • 2
  • 6
14
votes
2 answers

Static data in header-only libraries

I am developing a library that will consist of header files only. So far, it contains only classes, which has been fine. However, I have come to a point where I need to have some library-wide accessible unchanging data in the library (that is, not…
Seth Carnegie
  • 73,875
  • 22
  • 181
  • 249
13
votes
4 answers

How do I fix "SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder"."

I have an application that has the following error message: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder…
Dean013
  • 323
  • 1
  • 3
  • 10
13
votes
6 answers

How to insert characters into a Dart String?

I would like to add some white spaces to a Dart String in a given position, exactly like this (In Java). so... 'XPTOXXSFXBAC' become 'XPTO XXSF XBAC' Is there an easy way?
alexpfx
  • 6,412
  • 12
  • 52
  • 88
13
votes
1 answer

Why use add_library({tgt} IMPORTED) versus target_link_libraries( -l {.so | .a})?

What is the purpose of using the statement: add_library( [SHARED|STATIC] IMPORTED) From what I have found even if you create an imported library target above you still would need to specify the specific location of the actual .so or .a. This…
Spencer Duball
  • 531
  • 2
  • 6
  • 18