static-libraries

Import Library benefit

℡╲_俬逩灬. 提交于 2019-12-14 03:22:45
问题 I understand pros and cons of static and dynamic linking. But what is the benefit of Import Library? 回答1: As it is stated in this answer import library (a.k.a. stub library) is useful when one wants to link executable dynamically but do not want to mess with LoadLibrary and GetProcAddress functions. 来源: https://stackoverflow.com/questions/39401403/import-library-benefit

Undefined reference while linking static C library

故事扮演 提交于 2019-12-13 18:28:06
问题 In my latest project I am encountering a strange issue regarding an undefined reference to a method of a shared library. I searched on SO but all I could find was either C++ related (extern "C") or not really helping. The library in question is my fork of libosm which uses protobuf to generate de-/serialization code for OpenStreetMap data in its binary format (.osm.pbf). The function in question is osmpbf__blob__unpack but that is just the first I end up using so I suspect its a general

Xcode — get force_load to work with relative paths

蹲街弑〆低调 提交于 2019-12-13 18:06:40
问题 Some libraries require the -all_load linker flag when linking to an Xcode project. However, this leads to a linker error if there are symbol conflicts among libraries. The solution is to use -force_load, which effectively lets you use -all_load on some libraries, but not on others. However, this in turn leads to a new problem, at least for me. Whenever I use -force_load with a relative path to a library, the linker always finds symbol conflicts between the library and itself. It appears that

How to debug code of static library (libeay32.lib and ssleay32.lib)

被刻印的时光 ゝ 提交于 2019-12-13 16:34:43
问题 I have built openssl static libraries(libeay32.lib and ssleay32.lib) with openssl source code using VC++ compiler. I use them in a VS2010 project and they works well. #pragma comment( lib, "libeay32.lib" ) #pragma comment( lib, "ssleay32.lib" ) Then problem is I want to debug the source code of openssl libraries in VS2010(step into, step over...). For example, set a breakpoint in the openssl api and then step into the openssl source file. how can I achieve that? I have tried to use VS

Two .lib containing different functions with the same name: how to choose the right one?

℡╲_俬逩灬. 提交于 2019-12-13 14:19:22
问题 I have two static libraries lib1.lib, lib2.lib (not their code) with the same function-prototypes, but with different implementations. I tried including both, and it seems to use always the implementation from the first library included. If I include both of them in my project, is there a way to choose the implementation from a specific library? 回答1: I think it should be possible to write thin wrapper DLL's that link against each of the static libraries. Notice that this will only work if

Xcode can't find my static library!

妖精的绣舞 提交于 2019-12-13 14:13:15
问题 Here is the linker error: i686-apple-darwin10-gcc-4.2.1: /Users/william/Documents/SettingsLibrary/build/Debug-iphonesimulator/libSettingsLibrary.a: No such file or directory Command /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1 A couple of weird things, which may be clues to what is going on: 1) In my "library search paths", I have included the recursive path to the library project: ../SettingsLibrary/** However, SettingsLibrary builds itself

Xcode 6.1 static library .a for iOS not generated

丶灬走出姿态 提交于 2019-12-13 12:07:39
问题 I tried to make a static library for my iOS device using Xcode 6.1. I choose on Xcode a new project with template Cocoa Touch Static Library and named it MyLib. For MyLib target I choose iPhone 6 in the Simulator. After the project was opened, I build MyLib with succeed. But if I look to the Products folder, the libMyLib.a is red and nothing happens, if I want show it with finder. In prior versions of Xcode it seems to work, how I find in some tutorials. I found the solution: the library is

c++ Netbeans 7.2.1 linking boost libraries correctly

巧了我就是萌 提交于 2019-12-13 06:29:20
问题 I've recently switched from visual studio 2010 express to using NetBeans, and i'm already very impressed with the layout and simplicity, even though it did take a bit of nudging to compile right. However, i've got another problem. When i tested to see if boost would work as well, i included the file boost/signals.hpp in a main.cpp and then went to the additional library directories in the project options and added the lib directory of my boost install, same as i would do in visual studio.

What process/library on Android is responsible for dispatching touch events to applications?

本秂侑毒 提交于 2019-12-13 05:54:16
问题 What process/library on Android is responsible for dispatching touch events to applications? I was so focused on the hooking that I completely forgot that Android source is available. Update/Clarification: I want to have my code intercept all touch events for ALL applications in the system, do custom processing on them and forward to original receiver. Update 2: Assume a rooted device and application for private/internal use only, NOT for mass distribution Original, badly formulated question:

Compiling Bullet physics and Boost together as static libraries

落花浮王杯 提交于 2019-12-13 05:51:45
问题 I develop addons for a space flight simulator called Orbiter: http://orbit.medphys.ucl.ac.uk/ It accepts plugins as dll files. I recently made a plugin which uses the Bullet physics library as well. Its statically linked to the dll, so the bullet library is itself not a dll but compiled right into the plugin. Bullet is compiled with Multi-threaded (/MT) option for the release and Multi-threaded Debug (/MTd) for debug Now I want to use threads from Boost. So I installed the static Boost