Skip to main content

Questions tagged [static-libraries]

A static library is an archive of object files. Used as a linker input, the linker extracts the object files it needs to carry on the linkage.

static-libraries
0 votes
0 answers
16 views

grpc c++ - Shared library vs static library

I tried to build grpc c++ in two ways. One with -DBUILD_SHARED_LIBS=ON and one without it. When it is off, I get in the lib/ directory, for example: 360M libgrpc.a (Any many other libraries) When it ...
user3599803's user avatar
  • 6,852
-2 votes
0 answers
33 views

static library link dosent work (visual studio) [duplicate]

i have a static link library project and a regular project that is using the library project they ar both using the sfml library and are linked to it staticly when im not using any code from the ...
the block's user avatar
0 votes
0 answers
14 views

How to Build a Self-Contained TensorFlow Lite Static Library?

I am working on a project where I need to distribute a shared library that loads a TensorFlow Lite model and performs inference on input data provided by the user. My goal is for the users to be able ...
ZR Han's user avatar
  • 278
0 votes
2 answers
55 views

Can MinGW's static library be linked to MSVC

I use mingw-w64 on linux to cross compile the ffmpeg static library for windows with the following command: ./configure --arch=x86 --disable-doc --disable-ffplay --disable-ffprobe --disable-ffmpeg --...
ValueError's user avatar
1 vote
1 answer
72 views

Can static-libraries functions get inlined?

Can Static-libraries functions get inlined? lets say I have these files main.cpp #include <lib/header.hpp> int main() { return lib::meaningoflife(); } lib/header.hpp namespace lib { ...
user24551355's user avatar
0 votes
0 answers
28 views

Hiding non-exported symbols in static libraries on Windows

I have a set of C files that are compiled and linked into a library. If I create a normal dynamic library (.so, .dylib or .dll) I can make sure only those functions marked as EXPORTED are visible to ...
magicus's user avatar
  • 131
0 votes
0 answers
36 views

How to nest a static library in a static library project in Visual Studio

I have a c++ project in Visual Studio to create a static library. I need to modify it in order to use another external static library (in the specific this library is NLopt). If my project was a ...
Mattia's user avatar
  • 155
0 votes
0 answers
23 views

How to Build libQGLViewer as a Static Library (.lib) for MSVC in a Qt Project

I need help building libQGLViewer as a static library (.lib) instead of a DLL. Context: Project Setup: I'm working on a Qt project and we are migrating from MinGW to MSVC. Qt Version: 5.15.2 Compiler:...
Polymood's user avatar
  • 455
0 votes
0 answers
41 views

Building a static library that builds gRPC as submodule with cmake

I am building a static library (say, libsdk), and I am using gRPC as a submodule that is built (using add_subdirectory). I am able to build gRPC and my libsdk into a single static library (libsdk.a), ...
m1cky22's user avatar
  • 208
0 votes
0 answers
45 views

Ignoring "#include"s only in the released library?

I have a templated library where all of my classes are explicitly instantiated and built into a static library. The library is structured like this: repo/ | - include/ | - mylib/ ...
Chris Gnam's user avatar
0 votes
0 answers
17 views

Problem with link stage while try use yaml-cpp "library" [duplicate]

Hi I am try create static library from yaml-cpp. Windows x64 to use in my own project I did next steps: Clone repo prepare build dir and move to it mkdir build cd build Configure Cmake in different ...
DimaSem's user avatar
0 votes
1 answer
71 views

Is it possible to build opencv statically under Linux without having problems with missing/incompatible libraries?

I'm trying to distribute an opencv binary on different Linux operating systems, but I've failed because of dependency problems. What I'm aiming for is something similar to the opencv-python pip ...
smbape's user avatar
  • 1
-1 votes
1 answer
37 views

Unit testing a library build/compile options (CMake)

I have a library, and inside the library are two implementations of how it works, one is a GPIO wrapper and the other is a simulator for when the machine being developed on does not have real GPIO ...
MarkbCodes's user avatar
0 votes
0 answers
90 views

How to properly build Google V8 as a static library on a Mac OS in 2024?

I have been trying to follow the instructions to build V8 as described on the official web site with the intent of embedding it on my application but I keep getting a linker error. I followed the ...
Leonardo Rodrigues's user avatar
0 votes
1 answer
73 views

Correct way to link lssl and lcrypto for a static lib

I'm trying to build a static .a lib in C that would sha256 encrypt a string. I will access the lib from a C# NativeAOT program. Before adding the sha256 encryption code I used the following commands ...
user2384330's user avatar
1 vote
1 answer
64 views

create static library of files with .inl extension

I am trying to create a static library of files with .inl extension, but getting failed. If I change the extension to .cpp then it builds. CMakeLists.txt cmake_minimum_required(VERSION 3.0.0) project(...
Harry's user avatar
  • 2,607
0 votes
0 answers
28 views

How do I configure my library to best support static builds of dependent projects?

Suppose I am developing the libfoo library, written in a compiled language, and am using CMake to configure its build. This library itself depends on another library, libbar. Thus, if someone else is ...
einpoklum's user avatar
  • 127k
0 votes
0 answers
50 views

Linker error, can't compile GLFW on MacOS

I'm trying to setup my project using premake but i'm getting some linking error with GLFW, here are the premake files: premake file for GLFW lib: project "GLFW" kind "StaticLib"...
Nic_Urb's user avatar
0 votes
0 answers
46 views

Automatically extract pertinent headers belonging to a static library

I'm building a static library and want to automatically deploy header files next to the library that are required for the use of the library. I don't want to deploy headers that are not to be used ...
rzickler's user avatar
  • 303
0 votes
0 answers
25 views

failed to link the ".a" library into the project

I faced challenges in linking the library file to my project. I created a static library named "libadd.a" using e2 Studio IDE. Later, I initiated a Renesas microcontroller project in Visual ...
Vinay hs's user avatar
1 vote
1 answer
67 views

Missing symbols when statically linking library with static dependencies

I have an executable (test) using a static library (A), which uses another static library (B). The file structure is as follow: test: { CMakeLists.txt, main.cpp, deps: { A: { ...
luis's user avatar
  • 2,247
1 vote
0 answers
59 views

Static link in .net looking for shared library

I'm trying to test this static linking example with .net in linux and keep getting the following exception; System.DllNotFoundException: Unable to load shared library 'nativelib' or one of its ...
user2384330's user avatar
1 vote
0 answers
41 views

Using llvm-objcopy to remove symbols from static library (mach-o)

I am trying to use llvm-objcopy (or llvm-strip) to remove a symbol from a static library (mach-o). I am doing the following: $ llvm-objcopy --strip-symbol "...
Francisco Ryan Tolmasky I's user avatar
0 votes
1 answer
87 views

Best practice regarding static library linking and project directory structure in C

I have a project in C, and due to the nature of the application I'm making I've decided to statically link libconfig into my final binary to minimize the external dependencies needed to use it. Before,...
Zsargul's user avatar
  • 79
-1 votes
0 answers
23 views

What must be linked to use oatpp without cmake? [duplicate]

I am trying to learn oatpp. One process that I tend to do when learning a new library is to avoid cmake. The problem now happens that oatpp's library's examples exclusively uses cmake. Compile command ...
Stressed 's user avatar
0 votes
1 answer
54 views

Can the C++ linker deduce symbol from function call without a function prototype

If I have a static library with implementations for some classes and functions, is it possible to link to it without a header file that declares the functions and classes implemented in the static ...
mhdbabayi's user avatar
-5 votes
1 answer
88 views

Is It safe to move external header file in clang include directory in mac

In my mac system I have installed both gnu-gcc, gnu-g++ and apple-clang, apple-clang++ through home brew but as time. I am some header files are not available in apple-clang but in gnu-gcc there are. ...
Pritam's user avatar
  • 1
1 vote
1 answer
87 views

Executable program override a method

I have created an executable, that linked against a static library. But I want to create another program, that changes behavior of 1 method that defined in this lib without recompilation. I cannot use ...
Mike's user avatar
  • 11
1 vote
0 answers
104 views

Why can't F2PY link with my static library?

I have some fortran subroutines that I'm trying to convert to a Python extension module. One of the subroutines in my fortran code makes a call to another fortran subroutine which is compiled in a ...
LinharesAJ's user avatar
1 vote
1 answer
112 views

Where to download C++ WinApi libraries if there is only `.h` file in compiler folder?

I've recently installed mingw-w64-ucrt-x86_64-toolchain, acting according to this instruction. I thought that everything is fine until met undefined reference error with shellscalingapi. The weird ...
Tech of the Absence's user avatar
1 vote
1 answer
85 views

Is creating QML component libraries where all of the QML files are in the binary and the engine recognizes it just like QtQuick possible?

Is it possible to create QML component libraries where all of the QML files are in the binary and the engine still recognizes it just like QtQuick? So all of the QML files are bundled into the binary ...
Hashkoon's user avatar
0 votes
0 answers
20 views

Keep multi-version of a static-lib like what we do for shared-libs

I'm maintaining two branches of two projects: Projcect LeonLog: master(version: 2.0.0) producing(version: 1.0.0) Projcect Octopus: master(version: 6.0.0, depending on LeonLog:master) ...
Leon's user avatar
  • 1,997
0 votes
1 answer
47 views

Conan: How to get the exact version of a statically linked library contained in a pre-built package?

I used the following command to get a list of pre-built packages for the libpng library: conan download libpng/1.6.40 -p "arch=x86_64 AND os=Windows AND compiler=msvc AND compiler.version=192&...
langlauf.io's user avatar
  • 3,111
0 votes
0 answers
72 views

Linking static SDL_image in visual studio

I try to make a static link SDL2 library and SDL2_image to my visual studio project so that I can make ready to play exe. I have do almost everything which are set VC++ directories add path to ...
KanXd's user avatar
  • 1
1 vote
2 answers
46 views

DLL built from static lib is flashing a console

Here is a trouble I'm having and struggling with it for some days. We have a software artifact which we distribute both as a DLL and a static library; One client wants to use the static library with ...
daniel.franzini's user avatar
0 votes
0 answers
76 views

Visual Studio Additional Include Directories

I have .sln with two projects: library (.lib) and project (.exe), which use this library. Library uses external header and has path to it in Additional Include Directories, but I confused that I also ...
CppEnjoyer's user avatar
0 votes
1 answer
59 views

How is a garbage collector included in the final product of a compiler?

The question would mainly about how a garbage collector is included in programs written in a programming language. Let's for example take a language that uses LLVM, would the developers just write a ...
Snek's user avatar
  • 159
-1 votes
2 answers
146 views

Linker error: error adding symbols: bad value with GNU ARM toolchain

I am trying to build an application for ARM with the ARM GNU Toolchain (version 11.3 for now). To do so, I have a main program that I need to link to a static library foo that transitively depends on ...
Joshua Schroijen's user avatar
0 votes
1 answer
31 views

Need to decouple library and build a cohesive application

I have my application which has a hal function to invalidate cache memory. This application uses a library which needs the invalidate function. A straight solution is to couple the application and ...
basangouda46's user avatar
0 votes
1 answer
75 views

Compiling fortran program with archive library results in undefined reference state

I've made a small library which I archived. I am trying to use that archive when compiling my programs, but I end up with an undefined reference state. Here is an example. main.f90: program main ...
jared's user avatar
  • 7,781
-1 votes
1 answer
186 views

esp-zigbee-lib source files access

I'm struggling a bit to understand how Zigbee protocol works with the esp-zigbee-sdk's examples. I would like to access the C code of the libraries but it's static libraries and the the .h files are ...
HOSTEER's user avatar
1 vote
0 answers
27 views

Alternative to static linking OpenSSL

I am working on a shared library loaded into application that uses libcurl and libopenssl+libcrypto. For certain reasons I have to override memory allocation functions, using curl_global_init_mem and ...
Radim Vansa's user avatar
  • 5,828
1 vote
1 answer
89 views

How to build CPython with static libbz2

I've been trying to build CPython with static libs so as to port it into another machine. I've managed to make it work, it compiles fine and is accessible from the other machine. But the moment I try ...
Ricardo's user avatar
  • 349
0 votes
0 answers
17 views

How do I debug a static library in Atmel Studio 7?

I have two Atmel Studio projects: projA which produces a library file (.a) and projB which produces an executable file (.elf). projA is used within projB as a static library. I can compile projB with ...
brz's user avatar
  • 1
1 vote
0 answers
48 views

Main function in a static library

Is it possible that the main function was in a static library? For example, I don't want to include headers that are used in the main function in another project. If yes, then how can I describe it in ...
outjas's user avatar
  • 11
0 votes
1 answer
135 views

Why are standalone objects and static archives not treated the same way when generating a shared library?

I have been reading with a lot of interest this article: https://anadoxin.org/blog/control-over-symbol-exports-in-gcc.html/ It has a specific section entitled 'Static library used by a shared library ...
DaveC's user avatar
  • 157
0 votes
0 answers
49 views

CMake successfully builds static library but fails to build the same library as SHARED

I am trying to build a library in both Windows and Linux using the following CMakeLists.txt cmake_minimum_required(VERSION 3.26) if (WIN32) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) endif() ...
shashashamti2008's user avatar
4 votes
1 answer
874 views

Do Static Libraries need a PrivacyInfo.xcprivacy file? or they use the App-Level one?

I have a project that generates a fat Static Library (NOT a Static XC Framework), and the output of that project would be a single static library file let us say: "libProject.a" We are ...
TheDarkMatter's user avatar
1 vote
0 answers
114 views

Statically compile gcrypt

I've been bashing my head off this for a while now and am out of ideas. What I want to do I have an application written in C (on a linux platform) that has two main external dependencies. Raylib and ...
smolloy's user avatar
  • 338
0 votes
0 answers
49 views

Which step in compilation could be causing crashes in release builds when calling a modern OpenGL fuction from a static library?

I've been working on a static library to streamline two-dimensional rendering in OpenGL. The library is built using the glew and OpenGL libraries, and the other specifics are unimportant for this ...
Sunshy's user avatar
  • 1

15 30 50 per page
1
2 3 4 5
92