static-libraries

How to import static library in python? [duplicate]

老子叫甜甜 提交于 2019-11-28 00:54:37
问题 This question already has an answer here: ctypes for static libraries? 2 answers I have a static library(liba.a) and i want to use it in python but import can only import dynamic library in python how to import static library in python?? 回答1: You can't do this. You have two options: Recompile the library as a shared library . Then use ctypes to call methods from the dynamically-loaded shared library. Build a Python Extension exposing a Python interface to the shared library. 来源: https:/

XE4 ( Firemonkey + iOS Static Library) , Pascal conversion from Objective C Class?

时光怂恿深爱的人放手 提交于 2019-11-28 00:12:35
How to Conversion ? (Objective C Class -> Delphi XE4 ) and How to use Objective-C Class in static Library from Delphi XE ? Following is the my first trial. But It makes error. Objective C Source // objective C : test.h ---------------------------------------- @interface objc_test : NSObject { BOOL busy; } - (int) test :(int) value; @end // objective C : test.m ---------------------------------------- @implementation objc_test - (int) test :(int) value { busy = true; return( value + 1); } @end Here is wrong my conversion code. How to fix that ? Delphi Source // Delphi XE4 / iOS ----------------

Statically linking GTK+ libraries in windows

你。 提交于 2019-11-28 00:03:43
I have installed GCC and GTK+. Its working fine, but i need to statically link GTK+ libraries with my application (it's a small application) so that there exist only one '.exe'. mingw-cross-env has fixes to build gtk and all related libs statically The correct answer would be two words: not supported . Really, if you want to distribute your application, being it 2 or 100000 lines, just bind a copy of GTK+ with it. It is supported with a few minor issues (like having trouble finding configuration files), but you will have to compile GTK+ yourself! (the default binaries do not include static

What is the Microsoft Visual Studio equivalent to GCC ld option --whole-archive

亡梦爱人 提交于 2019-11-27 23:29:39
When linking a static library against an executable, unreferenced symbols are normally discarded. In my case some otherwise unused objects are used to register their respective classes into a factory and if the objects are discarded, this registration fails. Under Unix where we use gcc, I can pass the flag --whole-archive to the linker ld (see excerpt from ld documentation below), which makes ld not discard any objects. Is there anything like this for Visual C++? --whole-archive For each archive mentioned on the command line after the `--whole-archive' option, include every object file in the

It gives errors when using Swift Static library with Objective-C project

爷,独闯天下 提交于 2019-11-27 23:10:28
问题 I need to make swift static library for my requirement. I made swift static library which uses swift and Obj-c code. I have included Obj-c files via bridge file. I am able to compile swift static library without any error and get libMySwift.a file. I use Xcode9.3 with Swift4 to compile library. I include libMySwift.a in obj-c project and also included obj-c compatible header to access my lib in the project. When I try to compile the project it give below warning and more than 200 errors. Auto

Android NDK, two Static Libraries and Linking

爱⌒轻易说出口 提交于 2019-11-27 22:14:14
问题 I started off creating libraries as shared libraries, but I considered it would be more efficient to create one shared libraries and the rest static. When it was all shared, it compiled and linked fine, but moving to static, I get on linking "undefined reference". Edit: I build all the libraries in one Android.mk Android.mk: MY_LOCAL_PATH := $(call my-dir) MY_LOCAL_CFLAGS := -DDEBUG TARGET_PLATFORM := 'android-4' LOCAL_PATH := $(MY_LOCAL_PATH)/../../Base include $(CLEAR_VARS) LOCAL_MODULE :=

C++ - Can you build one static library into another?

你。 提交于 2019-11-27 21:49:12
问题 I ran into a strange problem with a Visual Studio 2008 project I was working with recently. I am trying to compile a new static library that uses functions from another static library. (Let's say Lib1 is my static library project, and Lib2 is the lib file that Lib1 depends on). I am able to build lib1 without issue; It includes the header files for lib2 and calls its functions, and there are no problems. The problem is when I build a separate test project that has Lib1 as a dependency; it won

How to resolve 'unrecognized selector sent to instance'?

白昼怎懂夜的黑 提交于 2019-11-27 20:23:59
In the AppDelegate, I'm alloc'ing an instance defined in a static library. This instance has an NSString property set a "copy". When I access the string property on this instance, the app crashes with 'unrecognized selector sent to instance'. Xcode provides a code hint for the property, which means it is known in the calling app. The particular class is compiled into the static library target. What am I missing? Adding some code. //static library //ClassA.h @interface ClassA : NSObject { ... NSString *downloadUrl; } @property(nonatomic, copy) NSString *downloadUrl; //ClassA.m @synthesize

g++: In what order should static and dynamic libraries be linked?

烂漫一生 提交于 2019-11-27 18:33:48
Let's say we got a main executable called "my_app" and it uses several other libraries: 3 libraries are linked statically, and other 3 are linked dynamically. In which order should they be linked against "my_app"? But in which order should these be linked? Let's say we got libSA (as in Static A) which depends on libSB, and libSC which depends on libSB: libSA -> libSB -> libSC and three dynamic libraries: libDA -> libDB -> libDC ( libDA is the basic, libDC is the highest) in which order should these be linked? the basic one first or last? g++ ... -g libSA libSB libSC -lDA -lDB -lDC -o my_app

Why does C# not have C++ style static libraries? [closed]

无人久伴 提交于 2019-11-27 17:48:33
问题 Lately I've been working on a few little .NET applications that share some common code. The code has some interfaces introduced to abstract away I/O calls for unit testing. I wanted the applications to be standalone EXEs with no external dependencies. This seems like the perfect use case for static libraries. Come to think of it third party control vendors could benefit from this model too. Are there some hidden nasties with static libraries that I've missed? Is there any reason why the C#