static-libraries

What's the difference between `-fembed-bitcode` and BITCODE_GENERATION_MODE?

时光总嘲笑我的痴心妄想 提交于 2019-11-28 05:50:33
I've been updating a static library to support bitcode, and from my research I found two ways to achieve that: Adding the fembed-bitcode flag to the Other C flags option in my project Build Settings ( link ) Adding a User-defined Setting with the key BITCODE_GENERATION_MODE set to bitcode ( link ) Is there any difference between these two options? The only difference I noted is that by using fembed-bitcode , the resulting static library for iphonesimulator will be built with full bitcode enabled (in my case, binary size changes from 5MB to 13MB, and I can check bitcode support using otool ),

Linking a static boost build into a static library under VS2012 & Win32/64

社会主义新天地 提交于 2019-11-28 05:45:31
问题 I'm trying to build a static library to be released as an API for a network device. I can successfully compile and link the library to produce .lib output files, and I relocate them into a directory structure as follows: EyeLib L-Include | L-PublicInterface.h L-Lib | L-debug | | L-MyLib.lib | | L-MyLib.pdb | L-release | L-MyLib.lib L-MyLibConfig.cmake Where the MyLibConfig.cmake file is extremely simple, and contains: # the header file is relative to this cmake file, so get the path. GET

How to compile Haskell to a static library?

 ̄綄美尐妖づ 提交于 2019-11-28 04:57:42
Hey, I'm learning Haskell and I'm interested in using it to make static libraries for using in Python and probably C. After some googling I found out how to get GHC to output a shared object, but it dynamically depends on GHC`s libraries. The resulting ELF from compiling in GHC is dynamically dependand only on C libs and it's a bit under a MB in size - it has been statically linked with GHC`s libs. How and if can this be achieved for shared objects? Example of current state: $ ghc --make -dynamic -shared -fPIC foo.hs -o libfoo.so $ ldd libfoo.so linux-vdso.so.1 => (0x00007fff125ff000)

CMake and Static Linking

三世轮回 提交于 2019-11-28 04:23:13
I'm using CMake in a project, and I'm trying to statically link some libraries. I've set: set(BUILD_SHARED_LIBS OFF) set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -static") set_target_properties(icarus PROPERTIES LINK_SEARCH_END_STATIC 1) And I've made sure when looking for the actual libraries that I have the *.a version of them. Currently the project imports: libPocoNet.a libPocoUtil.a libPocoXML.a libPocoFoundation.a libmysqlclient.a libmysqlpp.a libcrypto++.a CUDA All libraries are found, and when doing a dynamic/shared linkage, they work fine. I have also tried to set

Static compilation of Qt 5 fails under mingw with reference to off64_t

烈酒焚心 提交于 2019-11-28 04:15:21
问题 I tried to make static qt, and got error during mingw-make. This is text of error. static\qhttpnetworkreply.o access\qhttpnetworkreply.cpp In file included from ..\..\mkspecs\win32-g++/qplatformdefs.h:56:0, from access\qhttpnetworkreply_p.h:55, from access\qhttpnetworkreply.cpp:42: c:\mingw\include\io.h:301:14: error: 'off64_t' does not name a type __CRT_INLINE off64_t lseek64 (int, off64_t, int); ^ c:\mingw\include\io.h:302:14: error: 'off64_t' does not name a type __CRT_INLINE off64_t

Creating static library for iPhone

大憨熊 提交于 2019-11-28 03:52:06
There's an open source library that I would like to use for my iPhone app. The library is written in C and compiles with Makefiles. I would like to use a static library. If I add the .a file to my project dependencies, it works well with the simulator, but it doesn't link when targeting the iPhone SDK (certainly because the .a file is compiled for an Intel platform). What GCC compiler flags should I use to compile a static library for the iPhone SDK? I thought that the '-arch' option would provide me with an iPhone architecture, but no luck. Any help would be appreciated. For autoconf based

Static libraries in Xcode 4

断了今生、忘了曾经 提交于 2019-11-28 02:54:08
(My question has been asked here before but with no working answers that I can see. E.g. Xcode4 Workspace with Static library project & application project ) I'm trying to use a library provided by a 3rd party. They provide the XCode project which builds a libLibraryName.a file. They recommend adding the project as a subproject to my own, then adding the product libLibraryName.a file to the set of libraries described in my project settings "Link Binary with Libraries". The library does build correctly: the .a file is generated. But the project shows a red libLibraryName.a file under the

How to check if a static library is built for 64-bit?

帅比萌擦擦* 提交于 2019-11-28 02:52:31
I just built a static library for iOS with the build setting for Architectures set to $(ARCHS_STANDARD_INCLUDING_64_BIT) . I want to make sure that the .a library is properly including that architecture, but when i run lipo -info on it, I see: Architectures in the fat file: library.a are: armv7 armv7s (cputype (16777228) cpusubtype (0)) Does this mean that arm64 isn't included? If the lipo command can't tell me, is there another way to tell? I'm running Xcode 5 with the latest Command Line Tools installed. Yes, an arm64 slice is there. To see it, you need to use lipo from the iOS toolchain,

What is inside .lib file of Static library, Statically linked dynamic library and dynamically linked dynamic library?

China☆狼群 提交于 2019-11-28 02:40:48
What is inside of a .lib file of Static library, Statically linked dynamic library and dynamically linked dynamic library? How come there is no need for a .lib file in dynamically linked dynamic library and also that in static linking, the .lib file is nothing but a .obj file with all the methods. Is that correct? For a static library, the .lib file contains all the code and data for the library. The linker then identifies the bits it needs and puts them in the final executable. For a dynamic library, the .lib file contains a list of the exported functions and data elements from the library,

Xcode6 Creating Fat Static Library iOS Universal Framework

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-28 01:13:16
问题 Since the upgrade to Xcode and iOS8, I've been having trouble building a fat static library. There are some pretty good instructions here and here but I think parts of the first instructions and all of the second instructions are dated. The first instructions say to use Static iOS Framework and the second instructions say to use Cocoa Touch Static Library . Prior to Xcode6, I would use the Static iOS Framework but now that they have renamed it to Cocoa Touch Framework I'm not sure. So, for