static-libraries

Android NDK: Link using a pre-compiled static library

放肆的年华 提交于 2019-11-26 12:26:20
问题 I\'m trying to port Jnetpcap to Android in order to use it for parsing .pcap files. Jnetpcap is a java wrapper for libpcap which uses JNI. I have compiled libpcap as a static library using the android\'s source code tree. When compiling Jnetpcap as a shared library I\'m getting errors because I have to link with libpcap.a but I don\'t know how could I tell Android.mk that he must link with the libpcap.a file that I have. Using \"LOCAL_STATIC_LIBRARIES:= libpcap\" won\'t work because libpcap

How to compile a static library using the Android NDK?

南笙酒味 提交于 2019-11-26 12:22:29
问题 I\'m trying to compile a static library to use on Android but I can\'t figure out how to compile it. The library uses standard libraries (stdio.h etc...) and libxml2. I am trying to compile using arm-eabi-gcc but I get the following error: /cygdrive/c/android-ndk-r4/build/platforms/android-8/arch-x86/usr/include/asm/posix_types.h:15:28: error: posix_types_64.h: No such file or directory How do I get this to work? 回答1: As I understand it, the correct method is to use ndk-build and not invoking

How to See the Contents of Windows library (*.lib)

余生颓废 提交于 2019-11-26 12:15:51
问题 I have a binary file - Windows static library (*.lib). Is there a simple way to find out names of the functions and their interface from that library ? Something similar to emfar and elfdump utilities (on Linux systems) ? 回答1: Assuming you're talking about a static library, DUMPBIN /SYMBOLS shows the functions and data objects in the library. If you're talking about an import library (a .lib used to refer to symbols exported from a DLL), then you want DUMPBIN /EXPORTS . Note that for

Combine static libraries

牧云@^-^@ 提交于 2019-11-26 12:13:29
I tried the approach in this question , but it seems the linux version of ar is not the same as the mac version since I failed to combine the object files again. What I basically want to do is is merge another static library into my Xcode static library build product via a run-script build phase. Unfortunately I can't compile the other library directly into my project because it has it's own build system (therefore I use the compiled libs). I think it should be possible to merge the other library via ar into the Xcode generated library without decompiling the build product. How do I accomplish

How do i compile a static library (fat) for armv6, armv7 and i386

余生颓废 提交于 2019-11-26 12:12:40
问题 I know this question has been posed several times, but my goal is slightly different with regard to what I have found searching the web. Specifically, I am already able to build a static library for iPhone, but the final fat file I am able to build only contains arm and i386 architectures (and I am not sure to what arm refers: is v6 or v7?). I am not able to compile specifically for armv6 and armv7 and them merge both architectures using lipo. The lipo tool complains that the same

How can I create static library and can add just .a file on any project in ios

旧时模样 提交于 2019-11-26 12:09:27
问题 How can I create static library and can add just .a file on any project in ios. I tried doing this but couldn\'t do it. Thanks in advance 回答1: if you want create static lib mean refer the link http://jaym2503.blogspot.in/2013/01/how-to-make-universal-static-library.html Step 1 : Create a New Project, Named it "Logger" Step 2 : Create Classes You can create as many classes you wants, In our tutorial we will create one class named "Logger". So, now two files should be in our resource. 1. Logger

Telling gcc directly to link a library statically

半城伤御伤魂 提交于 2019-11-26 12:03:21
It feels strange to me to use -Wl,-Bstatic in order to tell gcc which libraries I want to link with statically. After all I'm telling gcc directly all other information about linking with libraries ( -Ldir , -llibname ). Is it possible to tell the gcc driver directly which libraries should be linked statically? Clarification: I know that if a certain library exists only in static versions it'll use it without -Wl,-Bstatic , but I want to imply gcc to prefer the static library. I also know that specifying the library file directly would link with it, but I prefer to keep the semantic for

Combining several static libraries into one using CMake

家住魔仙堡 提交于 2019-11-26 10:58:29
问题 I have a very similar problem to one described on the cmake mailing list where we have a project dependent on many static libraries (all built from source in individual submodules, each with their own CMakeLists.txt describing the build process for each library) that I\'d like to combine into a single static library for release to the consumers. The dependencies of my library are subject to change, and I do not want to burden developers further down the chain with those changes. The neat

Why are LIB files beasts of such a duplicitous nature?

你说的曾经没有我的故事 提交于 2019-11-26 10:27:39
问题 I\'m trying to understand this LIB file business on Microsoft Windows, and I\'ve just made a discovery that will - I hope - dispel the confusion that hitherto has prevented me from getting a clear grasp of the issue. To wit, LIB files are not the one kind of file that their file extension suggests they are. :: cd \"C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\Lib\" :: lib /nologo /list Ad1.Lib obj\\i386\\activdbgid.obj obj\\i386\\activscpid.obj obj\\i386\\ad1exid.obj obj\\i386\

VC++ resources in a static library

孤者浪人 提交于 2019-11-26 10:27:22
问题 Is it possible to build resources into a static library and reuse them by simply linking with the library? I\'m primarily thinking about the case where you call a function in the library which in turn accesses resources. 回答1: It can be done, but it's quite painful: You can't do it by simply linking with the static library. Consider this: resources are embedded in an EXE or DLL. When some code in the static library calls (e.g.) LoadIcon, it'll get the resources from the EXE or DLL that it's