shared

cygwin g++ Linker doesn't find shared library

血红的双手。 提交于 2019-11-30 13:06:31
I have been creating a library. When I compile it as a static library, it works fine. Now I want to turn it into a shared library. The library is created and in the proper place, but when I try to compile the client code, the linking phase says that it can't find the library. I already tried to rename it to al or dylib but that doesn't help either. When I put the -v flag on the linking, I can see that my library path is there. I also tried different paths. I used a relative path, but even with a full path it doesn't find it. The Makefile from the library: .SUFFIXES: .SUFFIXES: .o .cpp

Using a global variable in a shared library

守給你的承諾、 提交于 2019-11-30 12:20:20
问题 I am writing an application in C which used a global variable (a logfile structure). In my application I am loading shared libraries dynamically at runtime and I want to use a global variable pointing at the the same logfile structure to do logging in the shared library. This doesn't seem to be possible in the easy approach: declaring the global variable as extern will not work because dlopen() sais that the global variable is an undefined symbol defining the global variable again will work

C++ linker missing library when running (SONAME behavior)

主宰稳场 提交于 2019-11-30 07:38:12
I've made a program that uses two shared libraries (which I compiled) and are placed like this: /home_directory_where_I_compile_and_run_everything -->/lib/libjson_linux-gcc-4.4.6_libmt.so -->/lib/libre2.so.0 When I compile my program I pass the relative location of those libraries to the linker, like this: g++ ...... stuff ........ my_program.cc lib/libjson_linux-gcc-4.4.6_libmt.so lib/libre2.so.0 And it compiles fine, however when running the program it fails to find libre2.so, and if I inspect it with ldd, here's what happens: .... lib/libjson_linux-gcc-4.4.6_libmt.so (0x00007f62906bc000)

how to Shared element transition from a fragment to an activity

回眸只為那壹抹淺笑 提交于 2019-11-30 02:24:20
问题 I have three fragments inside a ViewPager in an activity, I want to achieve shared element transition from one of the fragments to another activity. The transition is from a recycler view which is inside a fragment which is inside a viewpager which is inside an Activity Activity->ViewPager->Fragment->Recyclerview I have searched each every places internet but there are info only about shared element transition from one fragment to another and one activity to another. There is no content about

Python Multiprocessing appending list

蓝咒 提交于 2019-11-30 01:24:31
问题 Have a quick question about a shared variable between multiple processes using Multiprocessing.Pool(). Will I run in to any issues if I am updating a global list from within multiple processes? I.e. if two of the processes were to try to update the list at the same time. I have seen documentation about using a Lock for similar things but I was wondering if it was necessary. EDIT: The way I am sharing this variable is by using a global variable in my callback function, 'successes' in which i

how is a shared library file called by two different processes in Linux?

有些话、适合烂在心里 提交于 2019-11-29 21:04:34
In Linux, I have a shared library file called foo.so When I execute 2 different process p1, p2 that both use foo.so. Does this foo.so get overlapped by those 2 process? jweyrich On Unix-based systems (includes Linux), the code segment (.text) may be shared among multiple processes because it's immutable. Is this overlapping you mention? Basically, each shared library that contains static data (such as global variables) has a Global Offset Table (GOT) . On shared libraries, all references to static data (think of global vars) occur via GOT (they're indirect). So even if the code segment is

How to list processes attached to a shared memory segment in linux?

*爱你&永不变心* 提交于 2019-11-29 19:44:20
How do I determine what process is attached to a shared memory segment? awagner@tree:/home/awagner$ ipcs -m ------ Shared Memory Segments -------- key shmid owner perms bytes nattch status 0x00000000 0 root 777 102400 1 0x00000000 32769 root 774 96 1 dest 0x00000000 98306 awagner 600 393216 2 dest 0x00000000 131075 awagner 600 393216 2 dest i.e. how do I figure out which two processes are attached to shmid 98306? I don't think you can do this with the standard tools. You can use ipcs -mp to get the process ID of the last process to attach/detach but I'm not aware of how to get all attached

Write a private access file to another app's files directory

那年仲夏 提交于 2019-11-29 14:31:52
问题 The two apps have the same sharedUserId. When I use this code in app1 context.openFileOutput("/data/data/org.me.app2/files/shared-data.dat", MODE_PRIVATE) I get an exception telling me that the file contains a path separator. I am trying to write a file from app1 into app2's storage. (I do of course need to make sure that app2's files directory exists first) Ideally, I would write to a user specific directory instead of an app specific directory, but I do not know if that can be done 回答1:

C++ linker missing library when running (SONAME behavior)

二次信任 提交于 2019-11-29 09:37:42
问题 I've made a program that uses two shared libraries (which I compiled) and are placed like this: /home_directory_where_I_compile_and_run_everything -->/lib/libjson_linux-gcc-4.4.6_libmt.so -->/lib/libre2.so.0 When I compile my program I pass the relative location of those libraries to the linker, like this: g++ ...... stuff ........ my_program.cc lib/libjson_linux-gcc-4.4.6_libmt.so lib/libre2.so.0 And it compiles fine, however when running the program it fails to find libre2.so, and if I

VM Tools安装与Shared Folders使用

我是研究僧i 提交于 2019-11-29 06:52:22
============================ Install VM Tools & Shared Folders 工具及版本 WinXP下VM 6.5.3 build-185404 linux.iso 116 MB (122,636,288 字节) ============================ 1>.VM下安装好Linux 2>."Ctrl+D"或者保持已安装OK的虚拟机为当前,选择菜单的"虚拟机"=>"设置" 3>.弹出当前已安装OK的虚拟机的"VM Settings",选择"Option"=>"Shared Folders"=>点取右方的"Always enabled"=>在下方点取"Add",添加一个Linux-Win共享的文件夹=>OK 4>.进入已安装OK的虚拟机,然后在"VM Settings"=>"Hardware"=>"CD/DVD"=>点取"使用ISO镜像"=>选择镜像为"linux.iso"=>OK 并在虚拟机中完成以下 mkdir /mnt/vmcdrom mount -t iso9660 /dev/cdrom /mnt/vmcdrom cd /mnt /mnt/vmcdrom ./vmware-install.pl 一路回车,直到提示安装成功; 5>.虚拟机中自动出现/mnt/hgfs文件夹,此夹下就是Linux