dll

CUDA Link Error (Lib to Dll)

微笑、不失礼 提交于 2020-01-04 12:48:30
问题 Im trying to create a framework to be able to use CUDA code in several game engine. To be able to communicate with all the wanted engines the frame consists of two main parts. A Lib and a DLL. The Lib contains all the functionality (CUDA and regular C++) and the DLL functions as a bridge to call functions from the Lib. Now, everything was running oke untill I've included a .cu file. When I'm building I'm getting the following error: Error 3 error LNK2019: unresolved external symbol _Add2And7

Load Library/Module from Memory

元气小坏坏 提交于 2020-01-04 08:15:10
问题 I realized a little C# porting of this application that allows to load libraries from memory/stream instead of using LoadLibrary API function that works through filesystem. After messing around a little bit with pointers and mimatching results... finally I have something working as intended. The only problem I have is that the call to DLLMain always fails (I tried it with Kernel32.dll and User32.dll). I can't understand why and I don't know how to debug the issue. Here is the main function of

Linking a DLL using xerces gives undefined symbols

左心房为你撑大大i 提交于 2020-01-04 06:20:10
问题 I'm creating a shared library/DLL using cygwin which makes use of Xerces. When I call the xercesc functions from the main application everything is fine, but when I try to put some code into the library, then I get undefined symbols for all the static stuff that xerxesc defines. For example: std::string fromXMLString(XMLCh *oXMLString) { std::string result; xercesc::DOMImplementation *impl = xercesc::DOMImplementationRegistry::getDOMImplementation(X("Core")); char *temp = xercesc::XMLString:

.NET Multiple Class Library in One Library

一个人想着一个人 提交于 2020-01-04 06:04:46
问题 I am working in VS2008. I have a custom class library (CL1) which references another custom class library (CL2). This ends up having CL1 and CL2 in my release folder. Now the consumer of CL1 needs to include two dll's in the project which I think is not appropriate. I have strong feeling that there must be a way to achieve a single DLL solution. Is there a recommended (guideline-d) way of achieving this. Merging CL1 and CL2 is not an option because CL2 is more common and referenced in

Exception thrown: 'System.Exception' in mscorlib.ni.dll on UWP App Start

和自甴很熟 提交于 2020-01-04 05:50:15
问题 So when I start my UWP application I briefly get a splash screen and then an exception is thrown at: mscorlib.ni.dll!System.RuntimeTypeHandle.GetTypeByName(string name, bool throwOnError, bool ignoreCase, bool reflectionOnly, ref System.Threading.StackCrawlMark stackMark, System.IntPtr pPrivHostBinder, bool loadTypeFromPartialName) mscorlib.ni.dll!System.RuntimeType.GetType(string typeName, bool throwOnError, bool ignoreCase, bool reflectionOnly, ref System.Threading.StackCrawlMark stackMark)

Mangle dll exported names with DEF file

蹲街弑〆低调 提交于 2020-01-04 05:27:18
问题 I'm trying to create a proxy dll and ran into this issue. Suppose I have following files: a.cpp: extern "C" int __declspec(dllexport) func(int x) {return x;} a.def: EXPORTS func ??4Test@@QAEAAU0@ABU0@@Z = func Then I run: cl /c c.cpp link /RELEASE /DLL /DEF:c.def /OUT:c.dll c.obj Output of dumpbin /exports c.dll shows that following symbols are exported: func ??4Test Where is the rest of the "Test" exported name? And is there any way to get it back? 回答1: One idea which came to my mind: export

JUnit & Powermock: Native Library already loaded in another classloader

不羁岁月 提交于 2020-01-04 05:14:10
问题 I have some test classes that need to verify that GLFW-functions were called. But when I want to execute all tests in IntelliJ then I get the error: Native Library lwjgl.dll already loaded in another classloader I use Powermock to verify that the static methods have been called: @RunWith(PowerMockRunner.class) @PrepareForTest({GLFW.class}) public class GlfwWindowImplTest { // ... @Test public void update_swapsBufferAndPollsEvents() { GlfwWindowImpl target = new GlfwWindowImpl(1L); mockStatic

Why is this class library dll not getting information from app.config

 ̄綄美尐妖づ 提交于 2020-01-04 04:12:28
问题 I am developing a custom HttpHandler, to do so I write a C# Class Library and compile to DLL. As part of this I have some directory locations which I want not hard coded in the app, so i'm trying to put it in the app.config which I've used before. Before this has worked by just going building the app.config: <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="Share" value="C:\...\"/> </appSettings> </configuration> And then obtaining this in code like: var

Fill a TStringList in a DLL

流过昼夜 提交于 2020-01-04 03:54:33
问题 I want to fill a TStringList inside a DLL. My approach seems to be wrong regarding memory management documentaion, but it works and doesn't cause an error or AV. Can someone tell me, if that code is OK? Not sure how I can fill a class in general in a DLL. programm EXE function MyClass_Create: IMyClass; stdcall; external ... var _myClass_DLL: IMyClass; //shared interface in exe and dll procedure FillList; var list: TStringList; begin list := TStringList.Create(true); //memory allocated in EXE

DLL (Delphi) with ADO (connection and query) not work in Java (using jna)

我怕爱的太早我们不能终老 提交于 2020-01-04 02:10:06
问题 I have a dll (Delphi) that contains a ADOConnection and ADOQuery, but when running the called DLL in java (using JNA) appear some error information to the console (below): A fatal error has been detected by the Java Runtime Environment: Internal Error (0xeedfade), pid=4400, tid=3840 JRE version: 6.0_25-b06 Java VM: Java HotSpot(TM) Client VM (20.0-b11 mixed mode, sharing windows-x86 ) Problematic frame: C [KERNELBASE.dll+0x812f] An error report file with more information is saved as: C:\Users