dynamic-linking

“Illegal instruction” when run precompiled program on other machine

三世轮回 提交于 2020-01-07 08:42:35
问题 I have to build my program on CentOS 7 and deploy on other Linux machine. The program required newer version glibc , and some library which was not (and will not be) installed on target machine. So I decided to ship the executable with dynamic library. I used patchelf to patch interpreter and rpath . I tested the executable on my machine and it work (also checked with ldd to make sure new rpath is used). But when I copy to other machine with libs, the program is failed to run. Only this line

sorting across sheets in excel

戏子无情 提交于 2020-01-06 16:28:53
问题 I don't know if this is possible or not. I have a workbook that has two sheets, "input" and "output" user1 fills in the "input sheet" Column A = name Column B = Age Column C = Location Column D = Hight .. .. Then on the "output" sheet Column A is set to copy the value from Column A on the "input" sheet and User2 fills in more details using the values that user1 has entered Column B = eye colour Column C = hair colour Column D = number of fingers .. .. So I hope you get the idea, User1 enters

sorting across sheets in excel

冷暖自知 提交于 2020-01-06 16:28:24
问题 I don't know if this is possible or not. I have a workbook that has two sheets, "input" and "output" user1 fills in the "input sheet" Column A = name Column B = Age Column C = Location Column D = Hight .. .. Then on the "output" sheet Column A is set to copy the value from Column A on the "input" sheet and User2 fills in more details using the values that user1 has entered Column B = eye colour Column C = hair colour Column D = number of fingers .. .. So I hope you get the idea, User1 enters

Python Linking Problem while running Django on Apache with mod_wsgi: symbol not found __cg_jpeg_resync_to_restart

妖精的绣舞 提交于 2020-01-06 13:08:15
问题 I get this error when I try to run my django site on apache. The site works on the development server: ViewDoesNotExist at / Could not import myproject.modulename.views. Error was: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_tkinter.so, 2): Symbol not found: __cg_jpeg_resync_to_restart Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO Expected in: /Applications/MAMP

Python Linking Problem while running Django on Apache with mod_wsgi: symbol not found __cg_jpeg_resync_to_restart

╄→гoц情女王★ 提交于 2020-01-06 13:07:43
问题 I get this error when I try to run my django site on apache. The site works on the development server: ViewDoesNotExist at / Could not import myproject.modulename.views. Error was: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_tkinter.so, 2): Symbol not found: __cg_jpeg_resync_to_restart Referenced from: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO Expected in: /Applications/MAMP

How to link a dynamic Rust library using only rustc and not cargo?

廉价感情. 提交于 2020-01-06 06:12:31
问题 My main.rs looks like // #[link(name = "lib")] extern "C" { fn hello(); } fn main() { unsafe { hello(); } } And lib.rs : #[no_mangle] pub fn hello() { println!("Hello, World!"); } I have compiled lib.rs using rustc --crate-type=cdylib lib.rs -o lib.so How do I link lib.so to rustc main.rs command ? 回答1: You need to match ABIs. When you use an extern "C" block, you need to declare your functions using the same ABI. Name your dynamic library using the platform's conventions. Use .dylib on macOS

How to link a dynamic Rust library using only rustc and not cargo?

孤者浪人 提交于 2020-01-06 06:11:48
问题 My main.rs looks like // #[link(name = "lib")] extern "C" { fn hello(); } fn main() { unsafe { hello(); } } And lib.rs : #[no_mangle] pub fn hello() { println!("Hello, World!"); } I have compiled lib.rs using rustc --crate-type=cdylib lib.rs -o lib.so How do I link lib.so to rustc main.rs command ? 回答1: You need to match ABIs. When you use an extern "C" block, you need to declare your functions using the same ABI. Name your dynamic library using the platform's conventions. Use .dylib on macOS

PHP Linking to a shared library in an extension

故事扮演 提交于 2020-01-04 03:19:48
问题 I'm working on a native PHP extension which includes symbols from a shared library, but I can't get the config.m4 file to generate a build procedure that includes the necessary linker options to correctly link to the share library. This is what I have in my config.m4 file so far: PHP_ARG_ENABLE(myextension, whether to enable MyExtension support, [ --enable-myextension Enable MyExtension support]) if test "$PHP_MYEXTENSION" = "yes"; then LIBNAME=otherlibrary LIBSYMBOL=otherlib_some_function

Linking to a DLL with a DEF file instead of a LIB file?

♀尐吖头ヾ 提交于 2020-01-04 02:41:07
问题 I have learned that you can: Convert a .DLL file into a .DEF file, which includes its exports (Edit: This doesn't work with many conventions) Convert a .DEF file into a .LIB file, which you can use to link to the DLL Why can't (most) linkers link to a DLL given only a .DEF file, instead of a .LIB file? 回答1: Ultimately, the answer here is 'because noone wanted it badly enough and it doesn't really help anything'. The DEF file is an input file that creates an import lib for the DLL. And then,

Why does a standalone C hello program crash when used as a dynamic linker

末鹿安然 提交于 2020-01-04 02:03:16
问题 The following program: #include <stdio.h> int main(int argc, char *argv[]) { for (int j = 0; j < argc; j++) printf("%d: %s\n", j, argv[j]); return 0; } built into a statically linked PIE: gcc -g -fpie main.c -static-pie -o ld.so works fine: $ ./ld.so foo bar 0: ./ld.so 1: foo 2: bar But when I use that program as an ELF interpreter for another program: $ gcc -g main.c -Wl,-I./ld.so -o a.out it crashes like so: gdb -q ./a.out (gdb) run Starting program: /tmp/a.out Program received signal