libtool

What is the difference between LDADD and LIBADD?

只愿长相守 提交于 2019-12-03 02:21:53
问题 I'm trying to setup an automake project that uses a mix of libtool libraries and exectuables, and I'm having a hard time grokking the automake documentation, esp. as relates to telling the compiler to link against. So can someone explain the differences between LDADD and LIBADD ? Things like: when is one used over the other, which one takes -lname_of_library style values vs. direct filenames, etc. Whenever I try to read the relevant documentation, it seems like it assumes that I know things

Link a static library to a shared one during build?

笑着哭i 提交于 2019-12-02 20:48:37
I have a problem building a shared library with GCC/Linux. Currently this shared library is created with GCC/libtool option "-shared" and everything is fine. Now there are two additional, static libraries (.a-files) that have to be added to this shared one since they provide some functionality that is required by the shared one. Adding these static libraries with option "-l" does not help, afterwards they are not part of the .so file. So how can I force GCC/libtool to really add the code of these static libraries to the shared library? Thanks! Dmitry Yudakov You need --whole-archive linker

Automake error './ltmain.sh' not found

强颜欢笑 提交于 2019-12-02 16:44:05
I've installed mingw and msys by using mingw-get-setup.exe . I've also installed Autotools(autoconf, automake,m4,libtool) into C:\/opt/autotools . When I run automake, the following error always occurs: configure.ac:11: error: required file './ltmain.sh' not found If I copy ltmain.sh from libtool’s installed tree, execution will finish normally. How can I configuure automake to find ltmain.sh without copying? In an autoconf / automake / libtool project you have to invoke: libtoolize : this copies/links a few support scripts, including ltmain.sh (which is the main component of libtool). aclocal

What is the difference between LDADD and LIBADD?

六眼飞鱼酱① 提交于 2019-12-02 15:52:31
I'm trying to setup an automake project that uses a mix of libtool libraries and exectuables, and I'm having a hard time grokking the automake documentation, esp. as relates to telling the compiler to link against. So can someone explain the differences between LDADD and LIBADD ? Things like: when is one used over the other, which one takes -lname_of_library style values vs. direct filenames, etc. Whenever I try to read the relevant documentation, it seems like it assumes that I know things that I don't. Use the LIBADD primary for libraries, and LDADD for executables. If you were building a

compile libconfig++ with -static-libgcc and -static-libstdc++

懵懂的女人 提交于 2019-12-02 08:00:50
问题 I'm trying to compile libconfig++ version 1.4.8 with make LDFLAGS='-static-libstdc++ -static-libgcc' but this doesn't seem to work since I'm still getting: $ readelf -d lib/.libs/libconfig++.so | grep NEEDED 0x0000000000000001 (NEEDED) Shared library: [libstdc++.so.6] 0x0000000000000001 (NEEDED) Shared library: [libm.so.6] 0x0000000000000001 (NEEDED) Shared library: [libc.so.6] 0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1] I'm noticing that the second-to-last compile step for

dynamic_cast an interface from a shared library which was loaded by lt_dlopen(libtool) doesn't work

本秂侑毒 提交于 2019-12-02 05:29:54
问题 This is about plugin features in my program. I need a C++ class(and object) in a plugin could be used by main module through an interface. The interface inheritance like this: typedef struct _rwd_plugin_root_t RWD_PLUGIN_ROOT_T; struct RWD_PLUGIN_API _rwd_plugin_root_t { virtual int add_ref() = 0; virtual int release() = 0; }; typedef struct _rwd_plugin_base_t RWD_PLUGIN_BASE_T; struct RWD_PLUGIN_API _rwd_plugin_base_t : _rwd_plugin_root_t { virtual RWD_PLUGIN_TYPE_T get_plugin_type() = 0;

dynamic_cast an interface from a shared library which was loaded by lt_dlopen(libtool) doesn't work

◇◆丶佛笑我妖孽 提交于 2019-12-02 02:38:44
This is about plugin features in my program. I need a C++ class(and object) in a plugin could be used by main module through an interface. The interface inheritance like this: typedef struct _rwd_plugin_root_t RWD_PLUGIN_ROOT_T; struct RWD_PLUGIN_API _rwd_plugin_root_t { virtual int add_ref() = 0; virtual int release() = 0; }; typedef struct _rwd_plugin_base_t RWD_PLUGIN_BASE_T; struct RWD_PLUGIN_API _rwd_plugin_base_t : _rwd_plugin_root_t { virtual RWD_PLUGIN_TYPE_T get_plugin_type() = 0; virtual const char * get_plugin_label_a() = 0; virtual const wchar_t * get_plugin_label_w() = 0; };

Buildroot - Applying A Patch Failed

夙愿已清 提交于 2019-12-01 10:44:37
问题 I'm trying to build a custom kernel image for my PhidgetSBC but I'm getting a failure during the build: bluez 4.96 Extracting bluez 4.96 Patching package/bluez for file in config.guess config.sub; do for i in $(find /home/kerubu/buildroot_phidgetsbc/new/buildroot-phidgetsbc_1.0.4.20111028/output/build/bluez-4.96 -name $file); do cp package/gnuconfig/$file $i; done; done Patching libtool Applying buildroot-libtool.patch using plaintext: patching file ltmain.sh Hunk #1 FAILED at 273. Hunk #2

Correct installation of config.h for shared library using autotools

早过忘川 提交于 2019-12-01 06:06:44
问题 I am converting a C++ program which uses the autotools build system to use a shared library, introducing the use of libtool. Most of the program functionality is being placed in the shared library, which is loaded by the main program, so that the common code can be accessed by other programs in future. Throughout the program and library sources the autoheader generated config.h is used with the usual macro: #if HAVE_CONFIG_H # include <config.h> #endif In configure.ac I use the macro to

Libtool installation issue with make install

不问归期 提交于 2019-11-30 14:56:59
问题 I use the following autotool steps to install my pacakges: ./configure make make install prefix=/my/path However I got the following libtool warning " libtool: warning: remember to run 'libtool --finish /usr/local/lib ' and " libtool: warning: 'lib/my.la' has not been installed in '/usr/local/lib' " when using the autotool to install my software package. If I change to the following command, the problem disappear: ./configure make prefix=/my/path make install prefix=/my/path It looks like the