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.

2
votes
0answers
39 views

C++: ar -x loss symbols

I am not sure if I have some misunderstanding on ar -x command, here's how to repeat the problem: Step 1. make sure there are symbols are there: $ nm librocksdb.a | c++filt | grep -s 'rocksdb::...
0
votes
0answers
40 views

To use shared libraries in C/C++, both the .h and .so files are needed? [duplicate]

I have seen the answer to my question heavily implied but have not seen it somewhere written, hence I am making these questions (just to be sure I am correct). To use a shared library in a C/C++ ...
-2
votes
0answers
15 views

Curl static library symbols undefined error at runtime

I am compiling my c++ application in g++ and it uses Xerces 3.1.2 library which internally requires curl library. While the compilation goes fine, i get the some runtime error. I have a c++ ...
1
vote
1answer
28 views

How to build a static library with libtensorflow-core.a and how to use it?

I'm running my code on the Ubuntu 16 system with TensorFlow-1.13.0-rc2. First, I ran bazel build //tensorflow:libtensorflow_cc.so for generate some *.pb.h header files. then run ./tensorflow/contrib/...
-1
votes
1answer
13 views

How to use modbus library in a Visual Studio 2017 project?

Full disclosure: I'm not a C/C++ programmer, I can write basic programs like a calculator or some other very basic stuff where you don't need to use external libraries. My goal is to use this modbus ...
0
votes
1answer
35 views

include libraries that are used in header file of self-made static library

In a static library project I have "myClass.h" that is somehow like below: class myClass{ . . #include "tensorflow/....h" //some tensorflow header file . . using tensorflow::Tensor; . . void ...
-1
votes
0answers
25 views

LNK2038 mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MTd_StaticDebug'

When i build (both debug and release) parquet/arrow code from apache website for windows i will get a set of .lib files as well as a .dll file. when i include the dll file in my solution everything ...
0
votes
1answer
35 views

How do I compile the my application with static library?

I am currently trying to use reactphysics3d library to make simple pariticle collision simulator. https://www.reactphysics3d.com/ I tried to compile my c++ file with the static library but it doesn't ...
0
votes
2answers
31 views

How to create a library with CMakeLists.txt and include it in another program?

I'm new to C/C++ development and I'm struggling with CMakeLists.txt in CLion IDE. I can't create a library (static or shared) that I can #include in another program. I have this kind of structure : ...
0
votes
0answers
15 views

Usage of c++17 precompiled headers in an older g++-environment

X-problem: Generating a library out of a cpp-headerfile. Y-problem: Is it possible to make c++17-features available in a non-c++17 environment? I've tried this via a precompiled header-file: $ g++-...
0
votes
1answer
35 views

Why do I get an undefined symbol when linking shared library that links static (gSoap) library?

I have a dynamic library that provides onvif services by linking to the libgsoapssl++.a static library from gsoap, which I have recompiled with -fPIC. I then link this dynamic library to an ...
0
votes
0answers
34 views

How to install MySQL to (or with) Static Version

i know there are some topics about this already, however after two days of trying all i could (mainly I was not aware what Im doing, so maybe i did it wrong), therefore if I can kindly ask you not to ...
0
votes
0answers
18 views

Finding symbols in libs in VS2017

Is there a grand table somewhere so I can identify what LIB must be included for a given unresolved external symbol when linking VS2017 C++ code? Alternatively a simplified library search utility ...
0
votes
1answer
38 views

How to use self ld, objcopy and ar in cmake?

I want use two version of static librares in my project. And I found an answer from Restricting symbols in a Linux static library. But I don't know how to use cmake to run following commands: ld -r ...
2
votes
2answers
79 views

What do link flags mean for static library?

"ar" -- is just tool to create archives. And all static libraries of form "lib*.a" are in fact just archived compiled objects + additional file with symbol table, added there by "ranlib". No linking ...
0
votes
0answers
12 views

LIB OR DLL? when exporting library

As far as I am concerned, compared to dll, there is no advantage in exporting lib libraries except for saving link problem. So when do you choose to export the lib library? Any idea would be ...
1
vote
1answer
61 views

Why do dynamically linked imports (in Windows) always load at application start up time?

One benefit of dynamically linking to a library is that when a function from that library is called, it is loaded into the virtual address space of the program, then the function is called. Statically ...
-1
votes
2answers
48 views

Qt Creator - How to deploy application using static parameter

I am trying on windows deploy and application as static, so the single exe file will include all required dlls inside. So when I distribute this single exe file amoung PCs, it will be working fine. ...
0
votes
0answers
27 views

Deque class is considered an unresolved external when used as a static library or as a seprate file in the same project [duplicate]

I am creating a library function include a custom deque and dequeNode class. The project is able to build but when referenced in another project, deque is an undefined external. While trying to find ...
0
votes
0answers
31 views

How to call static library static class member function from victim process of dll-injection process

I have successfully hooked a victim application with dll-injection. I now need to call an un-exported singleton function of the victim process. Is this possible, how would I go about it? Whilst I ...
0
votes
0answers
18 views

I am concerned about linking static libraries compiled with different threading models (Dwarf and SJLJ)

I have successfully linked the precompiled Dwarf libcurl.a (not libcurl.dll.a) with my SJLJ C++ application, and it is working without problems so far. I am concerned about this threading model ...
-2
votes
0answers
44 views

global object in a library not initialized when linked

I have a global object inside a library which I am linking against, but the constructor of the global object is never called, i can't seem to understand why lib.cpp #include <cstdio> struct ...
-1
votes
1answer
52 views

3rd party libraries (closed source)

Is there a way that you can build a binary file (shared or static library) in go language with bunch of source files and distribute it along with it's interfaces. It's not to be distributed as an ...
1
vote
2answers
34 views

How to use find_package on a package added from top level add_subdirectory?

This might be an x y problem, so here's my situation. Background I have the following project structure: -project -examples -example_that_uses_mylib_1 * CMakeLists.txt ...
0
votes
0answers
51 views

GCC cannot find static library

I was trying to build strongswan staticlly. I compiled openssl static library in a non-standard lib directory. I added -static to CFLAGS, and -L<path_to_static_library> to LDFLAGS in ./...
0
votes
1answer
31 views

Compiling with -static causes undefined references to functions in other libraries

I'm trying to statically link glibc in order to run my application on an older OS, but when I use the -static flag I get "undefined reference" errors for other libraries I'm using that I don't get ...
1
vote
2answers
63 views

Any way to tell linker to “respect” __attribute__((__used__))

I am trying to work around the fact that linker drops the registration in my code. See this answer for details. The problem I have with that answer is that the --whole-archive option seems like an ...
1
vote
0answers
21 views

Cocoapods .podspec cannot find include headers

I have a Objective-C iOS library that uses and ships a third party static C lib. One of my Objective-C source file imports that library using #import <teamspeak/public_errors.h> but the ...
0
votes
1answer
15 views

Build multiple versions of static library from one Visual Studio project

I have several projects A through F that each depend on static library L. Each is a project in my visual studio solution. Unfortunately, project F needs a slightly different flavor of the static ...
0
votes
0answers
27 views

Swift framework with Objective-C Static library included

I need to create a framework in swift, that will internally use a static library. It would be great if this library was only visible internally in this framework. I have added all the files of this ...
0
votes
1answer
31 views

Add debug symbols when linking static library

I am developing Qt application for macos. There I am linking static lib to executable. I would like to add debug symbols produced in lib's build to the executable. How could I achieve that ? I am ...
0
votes
0answers
22 views

ffmpeg static link in Visual Studio [duplicate]

I have build ffmpeg static library on Windows. It seems that everything completed with success. The result of build are following files: libavcodec.a libavdevice.a libavfilter.a libavformat.a ...
-1
votes
0answers
29 views

project containing spdlog linking another static lib that also contains spdlog

I have a project PROJECT_A which uses the header only library SPDLOG. I have another project PROJECT_B which also uses SPDLOG. PROJECT_A contains PROJECT_B as a submodule and links against it as a ...
0
votes
0answers
12 views

Debug symbols from static library

I am working on Qt application for MacOS. There I have main application which is using library statically linked. I am building the library with debug symbols and deploying the application using ...
0
votes
1answer
44 views

iOS: When to choose a Cocoa Touch Static Library or Framework?

To begin: I read the other questions here, but they are stating that e.g. Swift cannot be used in a Framework or/and Library or are outdated (5 years old). What are the advantages and downsides of a ...
0
votes
1answer
20 views

Create a Static Library on Windows Which Is macOS and Linux Compatible

I would like to generate a Static Library file in Windows using MSVC / IXX which is macOS and Linux compatible. I'm using C (Let's say C99) and the functions are really simple. For example: void ...
0
votes
0answers
9 views

What is the best way to install 64bit and 32bit versions of a custom library side by side in windows

I'm using CMake to install a static library and I need to support 32 bit and 64 bit side by side installs on Windows. What is the best way to install these side by side on Windows? Should I install ...
0
votes
0answers
12 views

Is it mpiseq an actual library?

During a compilation of a specific version of MUMPS/pyMumps? The linker use the argument -lmpiseq that it seems to be a sequential version of OpenMPI? Is that right? If yes, where I can find this ...
0
votes
0answers
39 views

How to correctly link 3 static libraries with dependencies with cmake? [duplicate]

I am importing three static libraries (A.a, B.a, C.a) with C depends on A and B, B depends on A. In my program I use functions in C. (Ubuntu 16.04 and CMake 3.5.1) In my cmake file I use ...
0
votes
0answers
12 views

Lapack and third-party static libraries for CMake-Arduino project. Do libraries need to be compiled with avr-gcc?

I'm using CMake 3.12.3 and avr-gcc 4.9.2 with a arduino-cmake build system I found on github. I would like to use Lapack or Lapack++ to do some linear algebra on the arduino but have doubts about ...
0
votes
0answers
34 views

How to add the cnaiapi library to a project

I am writing a program on Visual studio Express 2017, I have the API cnaiapi from Comer, i have compiled and built it, i have the .lib file but i cannot use it in my project. More specifically, I have ...
0
votes
0answers
29 views

Adding a static library to a Visual Studio project template

I want to create a VC++ project template with an included dependency in the form of a lib file(s). However, when I export it, it doesn't actually include the lib file (everything else seems to be fine ...
0
votes
0answers
67 views

Compiling GRPC C++ service statically

I am trying to deploy a C++ GRPC server on docker. Unfortunately, the grpc examples use dynamically linked GRPC libraries. When copying the executables to docker (e.g. a small alpine based one) it ...
1
vote
1answer
46 views

Invalid or corrupted file while compiling project included V8

I've just compiled V8 as static libraries, everything compiled fine, but when I try to include thiese .lib files into my VS project - it says "Invalid or corrupted library" for ...
1
vote
2answers
51 views

creating a static library using g++ -std=c++11 using templates

While creating a static library using c++11, it fails during linking I think. I can create a static library and link to it using the information in How to create a static library with g++? with ...
0
votes
2answers
30 views

Allowing undefined symbols in qmake

I use qmake and .pro files to generate my VisualStudio .vcxproj files. I have created a static library which contains helper functions for all my error handling. This includes wrappers for fetching ...
0
votes
1answer
31 views

Cmake: make static library and use in other projects

I need to make library test and use it in other projects by #include <libraryname> In project test: CmakeLists.txt ... add_library(libtest STATIC lib.h lib.cpp) set_target_properties(libtest ...
1
vote
1answer
66 views

Is it possible to compile a static library with an external dependancy that is unresolvable at compilation time?

I've created a web server using C and C++, which works in the following way: First, it initialize the socket for the connection. Then, when the server receives an HTTP request, it calls a function ...
0
votes
0answers
56 views

Linking to openssl 64-bit static library

I'm using Visual Studio 2017 and I'm trying to link to openssl 1.0.2 built by me as 64-bit Release static library as shown here. Actually it's my lib (also static) that is using openssl functions ...
0
votes
0answers
21 views

How to create static library for a wrapper and link it to code

I am writing a wrapper for one library.Currently my code call the library APIs directly. Plan is to create a wrapper static library and call the actual library APIs through wrapper APIs. My code will ...

http://mssss.yulina-kosm.ru