dynamic-linking

linux cross compiling and dynamic libraries / linking

安稳与你 提交于 2019-12-06 08:31:58
问题 i'm trying to develop for the BeagleBoard. Therefore i installed the CodeSourcery Sourcery_G++_Lite Toolchain. I want to use the opencv library. So I downloaded the sources to my Ubuntu devolepment system, compiled with gcc as shared library and installed the library. When i build a helloworld-application for the x86-Architecture, everything is fine. Now, i want to compile the same application with the other toolchain for the ARM-Architecture. I get these warnings/erros while compiling

How to compile SDL program and run it without DLL

倖福魔咒の 提交于 2019-12-06 07:20:20
is it possible to compile SDL library program into exec and run it without having "sdl.dll"? for example let say i wrote sdl program and it works and everything but the thing is to run the program on windows, i need to have "sdl.dll" within the same folder or system folder. is it possible to compile it so that i can just take the exec with me without needing to have "sdl.dll" along with it? i am using visual studio 2010 express. Typically the procedure for this kind of stuff is: Download the source code for the library. In SDL's case: http://www.libsdl.org/download-1.2.php . Build the library

Failed to linked symbol in .so file while the symbol exists

蹲街弑〆低调 提交于 2019-12-06 04:40:30
I want to install lxml module in my unix system, and it doesn't work. the problem is failed to reference symbol: Python 2.6.4 (r264:75706, Sep 12 2010, 18:46:30) [C] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>> from lxml import etree Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: ld.so.1: isapython2.6: fatal: relocation error: file lxml/etree.so: symbol __xmlStructuredErrorContext: referenced symbol not found however, the output of ldd command is: $ ldd lxml/etree.so libxslt.so.1 => /usr/lib/libxslt.so.1 libexslt.so.0

OpenCL C/C++ dynamic binding library (win32 and more)

[亡魂溺海] 提交于 2019-12-06 04:23:36
I'm giving a try at OpenCL, and in order to put this in production I'd like to be able to bind dynamically to OpenCL.DLL (when under Windows), in order to handle 'gracefully' the case where no OpenCL is installed on the host computer. Is there any available library (or code snippet) that takes care of this dynamic binding in C or C++, much like GLEW does for OpenGL ? I'd like to avoid the hassle to do it myself. Thanks, Here you go: http://clcc.sourceforge.net/clew_8h.html Since you're dealing with Win32, the easiest solution is delay loading. If you delay-load OpenCL, and the compiler-added

Why is my Linux application pulling in the wrong .so library?

﹥>﹥吖頭↗ 提交于 2019-12-06 03:53:02
问题 I have an application I'm building that's using the NetCDF C++ library, and NetCDF is pulling in the HDF-4 libary. However, it's pulling in the wrong HDF-4 library. Here's how my app is linked: /apps1/intel/bin/icpc -gxx-name=/apps1/gcc-4.5.0/bin/g++ -shared -o lib/libMyCustom.so -Llib -L/apps1/boost-1.48.0/lib -Wl,-rpath=/apps1/boost-1.48.0/lib -L/apps1/gdal-1.8.0-jasper/lib -Wl,-rpath=/apps1/gdal-1.8.0-jasper/lib -L/new_apps1/hdf4/lib -Wl,-rpath=/new_apps1/hdf4/lib -L/new_apps1/netcdf/lib

What's the purpose of copy relocation?

一个人想着一个人 提交于 2019-12-06 02:56:12
BACKGROUND: If an executable file has a external data reference, which is defined in a shared object, the compiler will use copy relocation and place a copy in its .bss section. Copy relocation is detailed in this site: http://www.shrubbery.net/solaris9ab/SUNWdev/LLM/p22.html#CHAPTER4-84604 However, my question is: Is it possible to implement it through GOT, just like the external data reference in shared object? The executable can indirectly accesses this external code through its GOT entry, and this GOT entry can be stuffed with the real address of this symbol in run-time. I don't know why

dlopen a dynamic library from a static library, when the dynamic library uses symbols of the static one

瘦欲@ 提交于 2019-12-06 02:38:10
问题 This question is closely related to dlopen a dynamic library from a static library linux C++, but contains a further complication (and uses C++ instead of C): I have an application that links against a static library (.a) and that library uses the dlopen function to load dynamic libraries (.so). In addition, the dynamic libraries call functions defined in the static one. Is there a way to compile this without linking the dynamic libraries against the static one or vice versa? Here comes what

how __libc_start_main@plt works?

不羁的心 提交于 2019-12-06 02:19:33
问题 This question was migrated from Unix & Linux Stack Exchange because it can be answered on Stack Overflow. Migrated 4 years ago . To study how the object file loaded and run in linux, I made the simplest c code, file name simple.c. int main(){} Next, I make object file and save object file as text file. $gcc ./simple.c $objdump -xD ./a.out > simple.text From many internet articles, I could catch that gcc dynamically load initiating functions like _start, _init, __libc_start_main@plt, and so on

.so with numerals after that, how to match them in find_library in cmake ? Error in linking shared objects which are found as sub-dependencies

£可爱£侵袭症+ 提交于 2019-12-06 02:00:24
Given ls -lrt /usr/lib/libvpx* results lrwxrwxrwx 1 root root 15 Feb 9 2012 /usr/lib/libvpx.so.1.0 ->libvpx.so.1.0.0 lrwxrwxrwx 1 root root 15 Feb 9 2012 /usr/lib/libvpx.so.1 -> libvpx.so.1.0.0 -rw-r--r-- 1 root root 646120 Feb 9 2012 /usr/lib/libvpx.so.1.0.0 ls -lrt /usr/lib/libschroedinger* results lrwxrwxrwx 1 root root 29 Feb 8 2012 /usr/lib/libschroedinger-1.0.so.0 ->libschroedinger-1.0.so.0.11.0 -rw-r--r-- 1 root root 774044 Feb 8 2012 /usr/lib/libschroedinger-1.0.so.0.11.0 ls -lrt /usr/lib/libgsm* results lrwxrwxrwx 1 root root 16 Nov 5 2009 /usr/lib/libgsm.so.1 -> libgsm.so.1.0.12 -rw

linking and paging in the system without virtual memory support

六眼飞鱼酱① 提交于 2019-12-05 19:41:53
First of all, is virtual memory a hardware feature of the system, or is it implemented solely by OS? During link-time relocation, the linker assigns run-time addresses to each section and each symbol, in the generated executable Do those run-time addresses correspond to virtual addresses? What if the system for which the executable is generated, does not use virtual memory? Next, if virtual memory is not used, then the application's address space is limited to the physical address space allocated for it by OS after load-time relocation Does page fault occur if no virtual memory is used? I