static-libraries

Do I need static libraries to statically link?

拥有回忆 提交于 2019-11-29 04:12:21
On 'C', Linux, Do I need static libraries to statically link, or the shared ones I have suffice? If not, why not? (Don't they contain the same data?) Yes, you need static libraries to build a statically linked executable. Static libraries are bundles of compiled objects. When you statically link with to library, it is effectively the same as taking the compilation results of that library, unpacking them in your current project, and using them as if they were your own objects. Dynamic libraries are already linked. This means that some information like relocations have already been fixed up and

How to build gnu `libiconv` on & for windows?

谁说我不能喝 提交于 2019-11-29 04:06:00
I want to build a static library (*.LIB file) GNU libiconv on windows to be used with other libraries in Visual C++. Other libraries I'm using are built with "MultiThreaded DLL" (/MD) Runtime option. So, I need to build libiconv with the same option. Problem is the libiconv uses GNU build system and I want to compile with /MD option. You can see the source structure of libiconv here: http://cvs.savannah.gnu.org/viewvc/libiconv/?root=libiconv Mr. Zlatkovic maintains the windows port of GNU libiconv for libxml2 you can see them here: ftp://xmlsoft.org/libxml2/win32/iconv-1.9.2.win32.zip I cannot

Android NDK, two Static Libraries and Linking

此生再无相见时 提交于 2019-11-29 03:53:25
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 := Base LOCAL_SRC_FILES := <Base src files> include $(BUILD_STATIC_LIBRARY) MY_LOCAL_STATIC_LIBRARIES :=

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

穿精又带淫゛_ 提交于 2019-11-29 03:48:30
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# designers left them out? Edit: I'm aware of ILMerge but it doesn't offer the same convenience as static

Building static libraries on Mac using CMake and GCC?

霸气de小男生 提交于 2019-11-29 03:38:39
Greetings all, I have a static library which I later link with my application. My development environment is CMake, GCC (Linux, Mac), MinGW (Windows). I can compile the static library without any problem on Linux and Windows. (I can even build shared libraries in my application on Mac). EDIT: I compiled the library as a SHARED library and it worked fine!! I have configured CMakeFile as follows to build the static library: add_library(centi STATIC ${base_srcs} ${crv_srcs} ${node_srcs} ${trnk_srcs} ${defl_srcs} ${infl_srcs} ${track_srcs} ${callback_srcs} ${extract_srcs}) During linking phase, it

Release mode static library much larger than debug mode version

試著忘記壹切 提交于 2019-11-29 03:06:52
today i found out that the compiled static library i'm working on is much larger in Release mode than in Debug . I found it very surprising, since most of the time the exact opposite happens (as far as i can tell). The size in debug mode is slightly over 3 MB (its a fairly large project), but in release it goes up to 6,5 MB. Can someone tell me what could be the reason for this? I'm using the usual Visual Studio (2008) settings for a static library project, changed almost nothing in the build configuration settings. In release, i'm using /O2 and "Favor size or speed" is set to "Neither". Could

Convert a static library target into a framework target in an Xcode project

隐身守侯 提交于 2019-11-29 02:36:57
问题 I have a an Xcode project which produces a static library. My team plans all new development in Swift. It is not possible to add Swift files to the static library project. We are dropping support for iOS 7, so it is now possible to include frameworks in our iOS app. Therefore, I intend to convert my static library project to a framework project. I have looked but I cannot find any tools or advice for how to perform this conversion. The static library is large (more than 100 .m files). I'm

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

烂漫一生 提交于 2019-11-29 01:56:18
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't build and I get linker errors. The unresolved externals are the functions I am trying to call within

Linking Windows DLL files from static libraries using CMake without hand-crafting unresolved symbol names

浪子不回头ぞ 提交于 2019-11-29 01:49:12
问题 The Situation I'm using Visual Studio 2008 SP1 (Professional Edition, both for 32-bit and 64-bit builds). I'm seeking a workaround to what I believe is a very unhelpful "limitation" in Visual Studio. I find it quite surprising that the Visual Studio linker and compiler does not do this right at DLL file creation time, to automatically scan all specified static libraries for all exported symbols in the same manner given in Building an Import Library and Export File and in a StackOverflow

Interface Builder can't see classes in a static library

筅森魡賤 提交于 2019-11-29 00:44:19
问题 I have refactored some UIView sub-classes into a static library. However, when using Interface Builder to create view components for a project that uses the static library I find that it is unaware of the library classes. What do I need to do to make the class interfaces visible to Interface Builder? Update: The correct answer refers to dragging the headers into the 'XIB browser'. The '.h' files can be dragged from a finder window to the window area identified in this image: alt text http:/