dll

CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS does not cover global variables

家住魔仙堡 提交于 2020-08-20 05:46:38
问题 Porting a C++ library, under CMake, to Windows. Option 1: Decorate the API with __declspec(dllexport) . Option 2: set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) . We go for option 2, since it seems much easier, and leaves our sources intact. Works like a charm: our application compiles and gets linked with the library dll. However, it ensures only the export of classes and functions. What needs to be done to export global variables? Like in: lib_source.cpp: int my_secret; app.cpp: extern int my

Why can't I import the dll that has a dependency and call a function from it on Uninstall in Inno Setup?

我与影子孤独终老i 提交于 2020-08-19 10:54:07
问题 Here's the code: [Files] Source: "IsStartServer.dll"; DestDir: "{app}" Source: "sqlite3x86.dll"; DestDir: "{app}" [Code] function O4TaskMngrSvcStopAndUninstall: LongBool; external 'CheckO4TaskMngrSvcStopAndUninstall@{app}\IsStartServer.dll,{app}\sqlite3x86.dll stdcall loadwithalteredsearchpath uninstallonly'; procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); begin if CurUninstallStep = usUninstall then begin O4TaskMngrSvcStopAndUninstall(); UnloadDLL(ExpandConstant('{app}

System.Printing not found( C# )?

旧时模样 提交于 2020-08-10 04:36:09
问题 I am trying to run the following example from MSDN: using System.Printing; public class PrintTest { public static void Main(string[] args) { // Create the printer server and print queue objects LocalPrintServer localPrintServer = new LocalPrintServer(); PrintQueue defaultPrintQueue = LocalPrintServer.GetDefaultPrintQueue(); // Call AddJob PrintSystemJobInfo myPrintJob = defaultPrintQueue.AddJob(); // Write a Byte buffer to the JobStream and close the stream Stream myStream = myPrintJob

LoadLibraryW and POSIX path separator

怎甘沉沦 提交于 2020-08-09 05:44:10
问题 The MSDN documentation for LoadLibrary warns not to use normal Unix slash "/": When specifying a path, be sure to use backslashes (\), not forward slashes (/). I couldn't find any problems using either forward slashes or backslashes (or both) when calling this API. I tried the following pathnames: c:/foo/bar/baz.dll /foo/bar/baz.dll c:/foo/bar\\baz.dll /foo/bar\\baz.dll ./bar/baz.dll All combinations worked as expected. Why does the MSDN recommend against using forward slashes as path

LoadLibraryW and POSIX path separator

試著忘記壹切 提交于 2020-08-09 05:43:30
问题 The MSDN documentation for LoadLibrary warns not to use normal Unix slash "/": When specifying a path, be sure to use backslashes (\), not forward slashes (/). I couldn't find any problems using either forward slashes or backslashes (or both) when calling this API. I tried the following pathnames: c:/foo/bar/baz.dll /foo/bar/baz.dll c:/foo/bar\\baz.dll /foo/bar\\baz.dll ./bar/baz.dll All combinations worked as expected. Why does the MSDN recommend against using forward slashes as path

How to fix 'ImportError: DLL load failed' in Visual Studio Code (packages installed with Anaconda)

好久不见. 提交于 2020-08-07 05:44:38
问题 I have installed Anaconda (with the packages that come with it) and VS Code (from within the Anaconda Navigator). If I open VS Code from the Anaconda Navigator or from The Anaconda Prompt, every import works well. But if I open VS Code directly, it throws an ImportError . For example: from PIL import Image Gives the following error: Traceback (most recent call last): File "c:\MyPrograms\Coding\Scripts\imageOperations.py", line 7, in <module> from PIL import Image File "C:\MyPrograms\Coding

Build open62541 DLL with Visual Studio 2017

坚强是说给别人听的谎言 提交于 2020-08-05 18:29:25
问题 Hello community I would like to write UI for OPC UA server using open62541 lib. The input off software should read text file and cast data throe server to already available client. Stuck at stage where need compile dll file for further using it in windows forms project. There is some info mentioned that Davy Triponney compiled it with Visual C++ 2013 https://github.com/open62541/open62541/wiki/Using-open62541-from-C%23 But I have no luck with VS 2017. There is sequence of my progress: Already

How to add my UserControl from another project (Dll) into my WPF Solution?

你离开我真会死。 提交于 2020-08-05 08:58:48
问题 So, everything is in the title, I just want to add a UserControl in my WPF Window. It looks like easy but the UserControl is in another project (Dll project) in the same solution. And I just can't reference it. So, my best try is something like that: <Window xmlns:local="clr-namespace:MyWindowProject" x:Name="window" xmlns:other="clr-namespace:MyDllProject" x:Class="MyWindowProject.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft

Wine spec files

萝らか妹 提交于 2020-08-03 05:07:47
问题 I have a Windows DLL called morag.dll containing functions foo and bar. I also have a Linux SO called morag.so containing the Linux implementations of foo and bar (same parameters on each platform). I have a Windows application that loads morag.dll that I want to run under wine. The application itself runs fine, however I need to create the mapping between foo and bar which are expected by my application to be found in morag.dll to instead use foo and bar in morag.so . To do this I know I

How to use FFTW DLL import library .lib as a static .lib in my project?

牧云@^-^@ 提交于 2020-07-21 07:38:48
问题 I've knowledge of C++ and compiling small plug-ins (always based on a similar and laid out workflow). Though currently I need to compile the latest version of FFTW into a static library (or get it from the compiled version which should supposedly be a lot easier) and it's giving me an insanely hard time. Probably because I don't know the ins and outs of compiling. As a note I'm working on Windows with Visual Studio. Since I really want to know how this should work I'm asking the question here