static-libraries

Mixing Static Libraries of C Code built from different versions of Visual Studio 2002 and later

﹥>﹥吖頭↗ 提交于 2019-11-30 09:44:42
问题 I have a static linkable library of C and Fortran routines compiled and linked together using the Visual Studio 2002 C (v7.0) Compiler and the Intel Fortran 9.0.018 Compiler. The C code in my library calls and links to the Microsoft C-RunTime (MSCRT) 2002 static libraries (single-threaded). I believe the actual version number of the 2002 CRT libraries is v7.0 I will refer to this static library as "vs2002if9.lib" Can I statically link to my "vs2002if9.lib" safely using any later version of

Link static library in another static library

旧巷老猫 提交于 2019-11-30 09:07:03
问题 I need to link the Abaqus ODB C++ API static library in another static library. I can get this to "work" but I get a lot of linker warnings. All of the warnings are LNK4006 and LNK4221, and concern the API libraries. I want to link the resulting static library in the main project. When I do this, the application starts and gives me a message like The application was unable to start correctly 0xc000007b. If this is unclear: API Lib -> MyProj Lib -> MainProj Please see the answer by Paul below.

gcc - A static library with undefined symbols?

僤鯓⒐⒋嵵緔 提交于 2019-11-30 08:59:19
I'm trying to build a project using a static library, so that the binary can be used even if the library isn't installed. However, I get lots of errors about undefined symbols when I try to do so. Looking at the library, I see it has tons of undefined symbols, even though it's a .a static lib: nm - u /usr/local/lib/libthis.a .... U EVP_DigestFinal_ex U EVP_DigestInit_ex U EVP_DigestUpdate U EVP_MD_CTX_cleanup U EVP_MD_CTX_init Those seem to be from openssl; others seem to be from libbzip2; etc. Questions: 1. Why does the static ( .a ) lib have dependencies on shared objects (e.g. libopenssl)

Duplicate symbol: Include static lib A in static lib B, also include lib A and B in XCode Project

懵懂的女人 提交于 2019-11-30 08:54:41
I've been trying to build up a set of reusable libraries for app development, but I'm starting to run into a problem. One of my static libs is a set of general use methods (categories on Objective-C Foundation classes to improve their usability) which I tend to use in every project. (We'll call it Lib A... i.e. XCode project A produces libProjectA.a) Then I have other static libs, things that contain specialized code for math, etc. (We'll call it Lib B.) Lib B links to Lib A because it needs to use some of that general functionality. (i.e. XCode project B links with libProjectA.a and produces

Test bundle could not be loaded because an unanticipated error

大兔子大兔子 提交于 2019-11-30 08:22:04
Recently I have started writing test case for one old static library. I have loaded the library to Xcode 5,Since Static Library is old , I have to manually add TestProject with Test Target. When I am trying "Product-->Test" , It launches emulator and Console shows following error The test bundle at /xxx/xxx/xxx/StaticLibTest.xctest could not be loaded because an unanticipated error occurred: Error Domain=NSCocoaErrorDomain Code=3587 "The bundle “StaticLibTest.xctest” couldn’t be loaded because it is damaged or missing necessary resources." (dlopen_preflight(/xxx/xxxx/xxx/Debug-iphonesimulator

Implementing Static Libraries In iPhone

一曲冷凌霜 提交于 2019-11-30 07:41:51
I have created a static library following this link . But I am facing Problems in using the library. For reference on how to use static libraries in an iPhone project I followed this link . But I am stil struggling with the "How to implement static libraries in any other iPhone project?" question. Thank you all. You can use cross-project referencing as in the posts but this has several downturns. I use this setup that works on Xcode in general (not only for the iPhone) and adds compile-time static library version control. I put my static libraries in ~/Library/MyLibraries/, the .a archive

GCC -rdynamic not working with static libraries

冷暖自知 提交于 2019-11-30 07:39:23
问题 Why is -rdynamic not exporting the symbols in .a files but is exporting the symbols in .o files ? I have an app and a plug-in in a .so file. The main app is linked using a series of object files and one static library, like this: CXXFLAGS = $(CXXFLAGS_COMMON) -rdynamic STATICLIBS = ../Utilities/Utilities.a ... all: $(CXX) $(CXXFLAGS) -o $(SAMPLE) main.o $(STATICLIBS) $(SHAREDLIBS) $(INCLUDES) (CXX is g++ 4.5.2 on Ubunut, I use mainly -std=c++Ox for compilation) In this case, the symbols in

Why don't iOS framework dependencies need to be explicitly linked to a static library project or framework project when they do for an app project?

一个人想着一个人 提交于 2019-11-30 07:27:26
Why exactly is it that when I create an iOS static library project or framework project in Xcode, I don't need to link any iOS SDK frameworks to the project in order to make use of their headers and objects -- for example, I can #import <AudioToolbox/AudioToolbox.h> and put AudioToolbox code in the static library or framework without actually having AudioToolbox added under "Link Binary with Libraries" in build settings or having it present in the file navigator, and the project will build without issue, something that wouldn't work in an app project -- but when a developer then uses the

Android linker: undefined reference to bsd_signal

大城市里の小女人 提交于 2019-11-30 07:25:05
I'm running gradlew to compile an Android app that has a static lib dependency. Somehow, I have an undefined reference to bsd_signal . I was able to compile this app with gradle 1.X, but I've been obliged to switch to gradle 2.10 and to drop my Android.mk file in favour of putting more build instruction into my gradle.build file, and this is where the trouble arises. Can anyone tell me whether there is a library that defines bsd_signal , which I should link to my project? Compiler output Starting process 'command '/home/myself/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9

How do static libraries do linking to dependencies?

徘徊边缘 提交于 2019-11-30 06:53:13
Say I have libA. It depends on for example libSomething for the simple fact that a non inline method of libA makes a call to a method in libSomething.h. How does the dependency link up in this case? Does libA have to statically link to libSomething when it is compiled, or will a user of libA (an application using libA) need to link to both libA and libSomething? Thanks Static linking is just copying the whole items (functions, constants, etc) into the resulting executable. If a static library's code contains references to some shared library items, these references will become dependencies in