static-libraries

How to merge two windows vc static library into one

浪尽此生 提交于 2019-11-27 09:47:51
I am having a two static library a.lib and b.lib (of C language) which is generated using VC6 (Visual studio 6.0) . I want to merge these two libs into one static lib c.lib . How to do this in CLI mode? I have seen the merging of *nix static libs . I want to do the samething with VC6 static libs in CLI mode. rashok LIB.EXE /OUT:c.lib a.lib b.lib LIB.EXE is available in < VC6_InstalledFolder >/VC98/BIN. And this LIB.EXE is available in all versions of visual studio. 来源: https://stackoverflow.com/questions/13492365/how-to-merge-two-windows-vc-static-library-into-one

Configuring Cocoapods with an existing static library and iOS application

强颜欢笑 提交于 2019-11-27 09:29:40
问题 I'm having trouble getting my workspace to compile correctly with Cocoapods. There are 3 projects in the workspace, each with their own target: libPods - Cocoapods static library with all the external dependencies libCommon - My static library where I keep all my shared code (base controllers, networking code, common UI, etc) myApp - My iOS application Both libCommon and myApp require the external dependencies from the libPods. Originally I thought it would work like this: libPods builds

iOS Static vs Dynamic frameworks clarifications

喜欢而已 提交于 2019-11-27 09:04:10
问题 I have to admit that with the release of iOS 8 I am a bit confused about dynamic and static frameworks in iOS. I am looking for a way to distribute a library that I created, and I need to support iOS 7 and above. (Note: This will be a proprietary framework. I cannot use cocoa pods, and I also cannot distribute the source). Here is what I already know: iOS 8 introduced "embedded frameworks" for iOS, but, as I understand, they do not work for iOS 7, only for iOS 8 and above. I have the option

Linker doesn't use a default runtime library when linking together libraries only (no objects)

*爱你&永不变心* 提交于 2019-11-27 08:49:01
问题 I want the users to be able to re-link my Qt-using application to their own build of Qt, without being forced to rebuild all of the sources. This could be used for LGPL compliance, for example. To do this, I need to provide object files for all of my sources. To make it easy, using qmake, I've partitioned the project internally into: A static library project that contains objects for all of the source files, including the file that has int main(int, char**) . An application project that links

Categories in static library for iPhone device 3.0

强颜欢笑 提交于 2019-11-27 08:45:47
I have categories in my static library. Any application developer should set -ObjC flag to "Other Linker Flags" to use my static library properly. It works fine for iPhone device/iPhone Simulator 2.x and iPhone Simulator 3.0. But it crashes for iPhone device 3.0. As written in this article it is new linker bug. They suggest to use one more linker flag: -all_load. But when I add this flag, build fails too, because there are duplicate symbols. How to use categories in static libraries for iPhone device 3.0? Any suggestions? We ran into the same problem (under 3.0, -ObjC no longer links in

fopen$UNIX2003 fails inside external library

不想你离开。 提交于 2019-11-27 08:20:15
问题 I have an external static library (I have the source code as well) that uses 'fopen' to access files on the filesystem. The strange thing is that it always fails both on simulator and device when it tries to do so with EXE_BAD_ACCESS inside fopen$UNIX2003 (not in fopen , fopen is not even in the call stack when the exception is thrown. I've tried to use fopen directly myself with the same path/options and it works. So, first of all, is it possible that the library is somehow calling a

Convert a Static Library to a Shared Library (create libsome.so from libsome.a): where's my symbols?

有些话、适合烂在心里 提交于 2019-11-27 08:07:25
the title of this question is an exact dupe , but the answers in that question don't help me. I have a bunch of object files packed in a static library: % g++ -std=c++98 -fpic -g -O1 -c -o foo.o foo.cpp % g++ -std=c++98 -fpic -g -O1 -c -o bar.o bar.cpp % ar -rc libsome.a foo.o bar.o I'd like to generate libsome.so from libsome.a instead of the object files, but the library is really barebones: % g++ -std=c++98 -fpic -g -O1 -shared -o libsome.so libsome.a % nm -DC libsome.so 0000xxxx A _DYNAMIC 0000xxxx A _GLOBAL_OFFSET_TABLE_ w _Jv_RegisterClasses 0000xxxx A __bss_start w __cxa_finalize

How can i statically link standard library to my c++ program?

a 夏天 提交于 2019-11-27 07:55:06
I'm using Code::Blocks IDE(v13.12) with GNU GCC Compiler. I want to the linker to link static versions of required runtime libraries for my programs,how may i do this? I already know that my executable size will increase,Would you please tell me other downsides? What about doing this in Visual C++ Express? Since nobody else has come up with an answer yet, I will give it a try. Unfortunately, I don't know that Code::Blocks IDE so my answer will only be partial. 1 How to Create a Statically Linked Executable with GCC This is not IDE specific but holds for GCC (and many other compilers) in

Linking static library with JNI

巧了我就是萌 提交于 2019-11-27 07:52:20
Java versions prior Java 8 requires native code to be in a shared library, but I've read that with Java 8 it's possible to use static linked libraries with JNI. I have searched for examples but couldn't find any. How can I statically link a JNI library into my java application? The Java SE 8 specification has been changed to support static linking, and static linking is implemented in the JDK. This is mentioned briefly in the spec for System.loadLibrary . The sections of the JNI Specification to which it refers are here and here . Native method signatures and data types are the same for

Linking static libraries, that share another static library

匆匆过客 提交于 2019-11-27 07:41:09
I currently have a single Xcode project for a very large code base, I'll call it Project X , which I am dividing into a bunch of sub projects ( Projects A, B, C ). So far, each of these projects compiles, on their own, just fine. They all produce static libraries. Project B and Project C are dependent on the static library produced by Project A in order to build. I have another xcode project, Project Z , that requires the static libraries produced by Projects B and C . Herein lies the problem. When Project Z enters the linker phase, things blow up - duplicate symbols are found within the libs