dll

The type exists in both DLLs

泄露秘密 提交于 2020-01-03 11:33:13
问题 I wanted to use something from Accord library as well as the AForge library. But when I installed it, I started getting the following error: Error CS0433 The type 'IntPoint' exists in both 'AForge, Version=2.2.5.0, Culture=neutral, PublicKeyToken=c1db6ff4eaa06aeb' and 'Accord, Version=3.0.2.0, Culture=neutral, PublicKeyToken=fa1a88e29555ccf7' On this line of code: startingPoint = new IntPoint(point.X, point.Y); How can I ensure that I only use the original AForge DLL for this? Is there

signal() overwriting other signal handlers

旧时模样 提交于 2020-01-03 11:02:39
问题 Does the signal() function overwrite other signal calls a process might have set up? I.e. if a SIGINT handler has been setup by a process, and a DLL calls signal(SIGINT,xxx) to handle its own termination code, does the original SIGINT handler get disabled? 回答1: The signal() call: Installs the handler you specify as a new signal handler, and Tells you what the old handler was. The new handler will be called instead of the old one. If you want to chain them, you need to do something like:

signal() overwriting other signal handlers

感情迁移 提交于 2020-01-03 11:01:28
问题 Does the signal() function overwrite other signal calls a process might have set up? I.e. if a SIGINT handler has been setup by a process, and a DLL calls signal(SIGINT,xxx) to handle its own termination code, does the original SIGINT handler get disabled? 回答1: The signal() call: Installs the handler you specify as a new signal handler, and Tells you what the old handler was. The new handler will be called instead of the old one. If you want to chain them, you need to do something like:

Can thread_local be used to provide a static global variable in a dll for each thread?

江枫思渺然 提交于 2020-01-03 10:47:15
问题 I want to use the C++11 keyword thread_local in our Open Source library, which can be dynamically or statically linked on numerous platforms (Windows, Linux, Mac OS, ...), in the context of a static variable. This variable is of a class-type that basically just encapsulates a std::stringstream variable and initialises it to fit our stringstream formatting requirements. We want to have this statically available for performance reasons( see my previous question for more details) and it is okay

Use .net core DLL in Framework 4.6 project

≡放荡痞女 提交于 2020-01-03 08:58:09
问题 I have built a DLL in .net core 2.0 and I now want to use it in a WinForms-project using the .net 4.6.1-framework. I can reference the dll but I get a "System.IO.FileLoadException" which says that "System.Runtime, Version 4.2.0.0" could not be found. What's the standard way to integrate a .net core 2.0-DLL in a full-framework-project? 回答1: According to MSDN you should reference .Net Standard and to reference .Net Standard 2.0 library you should have a project on .Net Framework 4.6.1 or higher

Use .net core DLL in Framework 4.6 project

只愿长相守 提交于 2020-01-03 08:58:08
问题 I have built a DLL in .net core 2.0 and I now want to use it in a WinForms-project using the .net 4.6.1-framework. I can reference the dll but I get a "System.IO.FileLoadException" which says that "System.Runtime, Version 4.2.0.0" could not be found. What's the standard way to integrate a .net core 2.0-DLL in a full-framework-project? 回答1: According to MSDN you should reference .Net Standard and to reference .Net Standard 2.0 library you should have a project on .Net Framework 4.6.1 or higher

DLL and class in multithreaded application

霸气de小男生 提交于 2020-01-03 08:08:09
问题 I have a class inside my DLL. And this DLL provides an "interface" to create objects of this class and call their methods. Class code (simplified): TLogger = class private // public function AddToLog(sBuf: PWideChar): Word; constructor Create(Name: PWideChar); destructor Destroy; override; end; constructor Create(Name: PWideChar); begin // end; destructor TLogger.Destroy; begin // end; function TLogger.AddToLog(sBuf: PWideChar): Word; var Temp1 : WideString; Temp2 : AnsiString; begin Result :

DLL and class in multithreaded application

青春壹個敷衍的年華 提交于 2020-01-03 08:08:08
问题 I have a class inside my DLL. And this DLL provides an "interface" to create objects of this class and call their methods. Class code (simplified): TLogger = class private // public function AddToLog(sBuf: PWideChar): Word; constructor Create(Name: PWideChar); destructor Destroy; override; end; constructor Create(Name: PWideChar); begin // end; destructor TLogger.Destroy; begin // end; function TLogger.AddToLog(sBuf: PWideChar): Word; var Temp1 : WideString; Temp2 : AnsiString; begin Result :

Can an inline variable be changed after initialization in C++17?

心已入冬 提交于 2020-01-03 07:19:32
问题 My scenario is the following (it worked in clang but not in gcc) liba.hpp: inline int MY_GLOBAL = 0; libother.cpp: (dll) #include "myliba.hpp" void myFunc() { // MYGLOBAL = 28; } someexe.cpp: RunAppThatUsesBothLibAandLibOther(); The problem is that the inline variable was showing 0 in places where I expected 28 because it was alrady modified at run-time. MSVC disagrees with this, but clang does the thing I would expect. The question is: can inline variables be modified at run-time in my

Can an inline variable be changed after initialization in C++17?

巧了我就是萌 提交于 2020-01-03 07:19:18
问题 My scenario is the following (it worked in clang but not in gcc) liba.hpp: inline int MY_GLOBAL = 0; libother.cpp: (dll) #include "myliba.hpp" void myFunc() { // MYGLOBAL = 28; } someexe.cpp: RunAppThatUsesBothLibAandLibOther(); The problem is that the inline variable was showing 0 in places where I expected 28 because it was alrady modified at run-time. MSVC disagrees with this, but clang does the thing I would expect. The question is: can inline variables be modified at run-time in my