static-libraries

Compiling a SWIG Python wrapper for a static library?

≡放荡痞女 提交于 2020-01-01 07:20:10
问题 This is a noob question. I'm trying to learn how to use SWIG to make a python interface for a C++ library. The library is a proprietary 3rd party library; it comes to me in the form of a header file (foo.h) and a static archive (libfoo.a). To simplify matters, I've cooked up an example which I think has the same pathology. Same error messages anyways. /* foo.hpp */ class TC { public: TC(); int i; private: }; For reference, here's foo.c. I only have the header and archive files for the real

Using magicalrecords library in custom static framework iOS

二次信任 提交于 2020-01-01 06:08:28
问题 I've been implementing a custom static framework for iOS. Everything is working well, but now I realized that I need a store information via coredata in the framework. I've been using the magicalrecord library with my previous projects and I was wondering if anyone has any experience integrating magicalrecord into your own custom static framework. When ever I call the setupcorestack method inside my framework code nothing happens. 回答1: Here's how we've done it: // 1: Note that all setup is

Using magicalrecords library in custom static framework iOS

喜你入骨 提交于 2020-01-01 06:07:20
问题 I've been implementing a custom static framework for iOS. Everything is working well, but now I realized that I need a store information via coredata in the framework. I've been using the magicalrecord library with my previous projects and I was wondering if anyone has any experience integrating magicalrecord into your own custom static framework. When ever I call the setupcorestack method inside my framework code nothing happens. 回答1: Here's how we've done it: // 1: Note that all setup is

Building iPhone static library for armv6 and armv7 that includes another static library

僤鯓⒐⒋嵵緔 提交于 2020-01-01 05:37:08
问题 I have an Xcode project that has a "master" static library target, that includes/links to a bunch of other static libraries from other Xcode projects. When building the master library target for "Optimized (armv6 armv7)", an error occurs in the last phase, during the CreateUniversalBinary step. For each .o file of the libraries that is included by the master library, the following error is reported (for example, the FBConnectGlobal.o file): warning for architecture: armv6 same member name

Xcode Multiple Static Libraries and Duplicate Symbols

懵懂的女人 提交于 2020-01-01 03:22:10
问题 I'm developing an iPad application which relies on two static utility libraries (libBFSDK & libBetfair-Platform). Both static libraries include AFNetworking. When I try to include the two static libraries in my iPad application, I get a linking error like: duplicate symbol _OBJC_METACLASS_$_AFImageCache in: /Users/osheas/Library/Developer/Xcode/DerivedData/Betfair-gnnjnwtovdmtoxakuxbjyvetciyy/Build/Products/Debug-iphonesimulator/libBFSDK.a(UIImageView+AFNetworking.o) /Users/osheas/Library

Statically linking libraries in MinGW

霸气de小男生 提交于 2020-01-01 03:00:08
问题 Suppose I have three C source files. The first two to be LIBs (lib*.a?), and the third is an application which uses them. The first is (re.c): int re(int i) { return i; } The second is (test.c): int re(int); // Depends on re.c int test(int i) { return re(i); } And the third is (main.c): #include<stdio.h> int test(int); // Uses test.c int main(void) { printf("%d\n",test(0)); return 0; } Now how can I create the first two LIBs in such a way that allows me to statically link them later with main

ARC App Crashes when accessing @property form ARC static lib

本小妞迷上赌 提交于 2020-01-01 02:44:12
问题 I have a ARC (automatic-reference-counting) app that builds a static library (also ARC). The app will launch fine but when the an action is performed that reads or writes to a @property in the static library the app will crash with this error: dyld: lazy symbol binding failed: Symbol not found: _objc_setProperty_nonatomic Referenced from: /var/mobile/Applications/0E7ADBB4-FFE5-4CEB-B418-8A35A92E99D4/MyApp.app/MyApp Expected in: /usr/lib/libobjc.A.dylib dyld: Symbol not found: _objc

iOS making a universal library - for i386 and arm7

感情迁移 提交于 2020-01-01 01:15:34
问题 We are building a library for use in iOS development. We can generate either a i386 library for the simulator, or a arm7 library for the hardware device. As it is now, we need to have two different files (.a libraries) when distributing the library to our other developers. This is a little bit cumbersome for distribution purposes. I was wondering; is there a way to build the library in XCode so that a single .a library file has both i386 and arm7 in it, so that we can distribute just a single

Unexpected undefined reference

不问归期 提交于 2019-12-31 07:19:17
问题 I'm getting an undefined referenced error, not knowing the reason why. So I have 2 files which makes a static lib : keyboard_input.c, keyboard_input.h Here's the content of the .h file: #ifndef __MOD_KBINPUT__ #define __MOD_KBINPUT__ int kbInit(); int kbWait(); int kbTest(); #endif And the CMakeLists.txt file looks like this: FILE( GLOB_RECURSE sources *.c ) INCLUDE_DIRECTORIES("${PROJECT_SOURCE_DIR}/include/utils/kbreader") ADD_LIBRARY(keyboardReader ${sources}) Compiling this lib gives some

Linking error with cmake

懵懂的女人 提交于 2019-12-31 01:46:37
问题 I'm trying to understand why I get a linking error while compiling a project generated with CMake. The CMakeFiles.txt builds a static library for each folder of the project and then link all of them together in the following way: # root CMakeLists.txt add_subdirectory(subfolder1) add_subdirectory(subfolder2) add_subdirectory(...) add_executable(target ${SOURCES}) set(LIBRARIES LIB_FOO LIB_BAR ... ) target_link_libraries(target ${LIBRARIES} ) then in each subfolder I have a simple CMakeLists