shared-libraries

Share DLL between 2 process in .net

自古美人都是妖i 提交于 2019-12-12 04:36:06
问题 I have 2 Winforms project and 1 Library project in my solution, this 2 winforms will be launched independently by the user. What happens right now is that the shared DLL is instantiated in memory per process, even if both exes are in the same folder or if the DLL is in the GAC. But I wish I could reuse the same DLL between those 2 process. I found a workaround, create a third project and instantiate the winforms project from there, in this case the DLL will be only instantiated once in memory

Cannot import shapely.geometry in Python

拈花ヽ惹草 提交于 2019-12-12 04:28:50
问题 I am trying to import Multipoint from shapely.geometry in IPython notebook. When I do "from shapely.geometry import MultiPoint", I get the error "No module named shapely.geometry". So, I tried doing "!pip install --upgrade shapely", for this I get the error Running setup.py (path:/tmp/pip-build-NyZFjW/shapely/setup.py) egg_info for package shapely Failed `CDLL(libgeos_c.so.1)` Failed `CDLL(libgeos_c.so)` Traceback (most recent call last): File "<string>", line 17, in <module> File "/tmp/pip

How to link or load shared libraries (.so) in Objective C?

烈酒焚心 提交于 2019-12-12 03:53:31
问题 I added a shared library (.so) to target in the Build Phases.How to use the functions in the library? Including the headers in the Controllers is fine. or do I need to explicitly load the library.Please let me know how to use .so in Objective C. 来源: https://stackoverflow.com/questions/15784593/how-to-link-or-load-shared-libraries-so-in-objective-c

Get shared library name from handle

醉酒当歌 提交于 2019-12-12 03:42:05
问题 I'm calling a library function that takes a parameter, loads an appropriate shared library and returns a handle to the so. The library calls calls dlopen to open a reference to the shared library. Is there a way I can get the name/path of the shared library from the handle returned? 来源: https://stackoverflow.com/questions/39696609/get-shared-library-name-from-handle

transfer the data between shared library and application

泄露秘密 提交于 2019-12-12 03:35:21
问题 I have shared library where I does some data generations/processing , and I have written some APIs and application to access them and transfer the data . / * ** * ** * ** * **** APPLICATION * ** * ** * ** / char* data1; char* data2; genratedCamData(1, char* data1 , char *data2); printf(" data1 %s ",data1); printf(" data2 %s ",data2); free(data2); / * ** * ** * ** * ** Inside Library ** * ** * ** * ** * ** * */ int genratedCamData(1, char* datafirst , char *datasecond) { if(CAM==1) datafirst

C++ Link two Shared Library to main.cpp

安稳与你 提交于 2019-12-12 03:31:11
问题 I'm having some problems try to link two shared library to my main.cpp file in a cmake file. My folder tree is: **mainfolder** |_main.cpp |_CMakeLists.txt | | **lib** |_**lib1** |_CMakeLists.txt |_liblib1.so |_**src** |_lib1.cpp |_**include** |_lib1.h |_**lib2** |_CMakeLists.txt |_liblib2.so |_**src** |_lib2.cpp |_**include** |_lib2.h the two CMakeLists.txt for the two libraries are quite similar and created according to this link: cmake_minimum_required(VERSION 2.6) project( LibraryLib1 C

error while loading shared libraries

孤者浪人 提交于 2019-12-12 03:25:59
问题 I'm trying to install Code::Blocks from source. There is an `anarchy' folder on my university's CS department's mainframe, where anyone can install anything, basically. wxwidgets is a dependency of Code::Blocks, and I'm trying to put wxGTK, as it's called, into my own folder on `anarchy', which works fine. I then compile Code::Blocks with the correct configure flags so that it recognizes wxwidgets 2.8 during the installation. But then, when I want to run `codeblocks', it says codeblocks:

Creating a shared object which depends on other shared objects

我只是一个虾纸丫 提交于 2019-12-12 03:09:00
问题 The Problem I am creating a shared object (called libA.so ) which uses OpenCV shared objects (for example libopencv_core.so ). Here's my shared object's code: #include "opencv2/opencv.hpp" #include "rgbframe.h" #define API_EXPORT __attribute__ ((visibility ("default"))) #define API_LOCAL __attribute__ ((visibility ("hidden"))) using namespace cv; API_EXPORT RGBFrame getFrame(int width, int height){ VideoCapture cap(0); RGBFrame frame; if(!cap.isOpened()) return frame; // Set camera resolution

In different situations during creating shared libraries, what functions can be called with the lib?

风流意气都作罢 提交于 2019-12-12 02:37:39
问题 I have read related tutorials regarding shared and static libraries, such as: "Creating a shared and static library with the gnu compiler [gcc]" "Static, Shared Dynamic and Loadable Linux Libraries" However, unfortunately, all examples they used are one function one .c file. I have two questions: (1) If I have one file with two more functions, such as example1.c void ctest11(int *i) { *i = 5; } void ctest12(int *i) { *i = 5; } After compiling exmaple1.c to libexample1.so, can I call ctest11

How can I secure the plugins I load?

送分小仙女□ 提交于 2019-12-12 02:37:38
问题 Let's say my piece of code scans the directory ./plugins and loads .dll s/ .so s with a known symbol ("function" here) in order to extend its functionnality, like this: main.c #include <stdlib.h> #include <dirent.h> #include <string.h> #include <stdio.h> #include <dlfcn.h> int main(void) { DIR *dir; struct dirent *entry; dir = opendir("./plugins"); if (dir == NULL) return -1; while ((entry = readdir(dir)) != NULL) { void *handle; char path[PATH_MAX]; int (*function)(char *); if (strstr(entry-