Path for dynamically loading OpenCL.dll? - opencl

I want to dynamically link OpenCL.dll on the users PC.
When I analyse my own PC I am able to find a lot of OpenCL.dll
C:/Windows/SysWOW64
C:/Windows/System32/DriverStore/...
C:/Windows/System32
C:/Program Files(x86)/AMD APP SDK /...
So I would like to know which is the correct path to load this dll at run time?
Also what is the path for other platforms?

If you are running a 32-bit executable on a 64-bit machine, you want the C:\Windows\SysWOW64 version. If you are running a 64-bit executable on a 64-bit machine or a 32-bit executable on a 32-bit machine, you want the C:\Windows\System version. But I will say that the Windows LoadLibrary call will figure that stuff out for you. You should just be able to call LoadLibrary(L"OpenCL.dll"). It will pick the right one for you.
The other locations are part of driver or SDK installations that may not be deployed on other systems that have OpenCL.

Related

Deploy Qt to Windows on a Linux machine

Feels like a silly question, but I'm struggling to find the answer online: Is it possible to deploy Qt apps to Windows if you did development on a Linux machine? It seems the answer should be "yes", but I can't seem to use windeployqt on my linux machine.
If it is possible, what additional resources do I need to do this?
Yes, it's of course possible.
You have to cross-compile Qt using the MinGW compiler, targeting Windows.
You'll have to patch and build windeployqt yourself. By default, windeployqt is looking for g++.exe in the path. Of course this makes no sense on a linux build host, so you'd have to tweak it so that it finds the correct compiler and runtime libraries.
You can then build your application using the cross-targeted Qt build, and deploy all the necessary artifacts into some deploy folder using windeployqt.
To package the deployed build, you can run nsis or wix on Linux as well, to obtain a Windows installer. You can even sign the executable files (required these days for Windows), there's an open source tool called osslsigncode - it works on most platforms and doesn't require Windows.
It'll take a bit of time for you to figure it all out. It's certainly easiest to just build on Windows and not mess with it. But if you insist on building on Linux - you certainly can.

How To Deploy Qt MinGW application for windows

I have develop an application by using QT/ MinGW 32 bit.This app work on my pc Windows 8. But ı want to deploy this app to my friends whose computers has windows 7. How to deploy it.Is there a necessary programs,framework to work it like .net framework, C++ runtime etc.. I don't know.I can't find a clear solution
To deploy a Qt app on Windows, you'll need to gather files from a few different locations. Here is an example how to do it.
See http://doc.qt.io/qt-5/windows-deployment.html, section "Creating the Application Package". You just have to copy all the necessary DLLs (and other files in case of Qt Quick) to the same directory as executable file. The best way to test whether you have all the required files is to rename your Qt installation directory (C:\Qt) to something else and try to double-click your executable.
Deployment on Windows 7 is no different from Windows 8.

How to configure an InstallShield 2009 project to run on 32- and 64-bit systems

I have a 32-bit application that I'm packaging with InstallShield 2009 Premier. I would like to be able to install it on 32- and 64-bit machines, but the InstallShield installer doesn't seem to be able to automatically detect that it's being run on a 64-bit machine and consequently redirect the creation of registry keys to HKLM\Software\Wow6432Node... and the creation of files to C:\Program Files (x86)... Despite my best googling, I can't seem to find out how to configure the InstallShield project to account for this.
Any ideas?
Since you have a 32-bit application, you need to leave its installer the way it is.
Wow6432Node and Program Files (x86) were specifically designed for 32-bit applications. On a 64-bit machine Program Files and HKLM\Software are for 64-bit applications only.
A mixed 32/64-bit installer can be used only for an AnyCPU application.

DLL File for windows 7 64bit

I'm porting my Windows XP application (wrote with C#) to Windows 7 application.
Now I'm using sqlite3.dll on my XP App (32bit) and I would download sqlite3.dll for 64bit machine.
For my purpose I've moved sqlite3.dll on my /bin folder and, obviously, when I try to start my app on windows 7 I receive an error.
So, where I download this file?
Please, help me...
Edit: I've downloaded sqlite3 http://www.sqlite.org/download.html
The SQLite website only has the 32-bit .dll, to get a 64-bit one you'll have to download and compile the source yourself.
Since you're using C#, an easier way is to use System.Data.SQLite ( http://sqlite.phxsoftware.com/ ). They have a 64-bit download available, which is SQLite itself and their ADO.NET provider combined into one .dll. It's the easiest way to use SQLite on Windows with C# I think.
Update: New download URL is http://system.data.sqlite.org/index.html/doc/trunk/www/downloads.wiki
bin/x64 directory contains 64-bit NATIVE DLL, named System.Data.SQLite.dll which is SQLITE3.dll compiled for AMD64/X86_64 platforms.
The url is:
http://sourceforge.net/projects/sqlite-dotnet2/files/SQLite%20for%20ADO.NET%202.0/1.0.66.0/
(IF it was you`re looking for).
Download SQLite-1.0.66.0-setup.exe from
http://sourceforge.net/projects/sqlite-dotnet2/files/SQLite%20for%20ADO.NET%202.0/1.0.66.0/
Run this executable will create a folder under C:\Program Files (x86)\SQLite.NET
Pick the System.Data.SQLite.DLL from bin/x64 and renamed it to sqlite3.dll
-- and you are good to go.
For your case, since your app was already written, you won't want to rewrite it.
You can simply recompile your .NET project targeting to 32 bit.
Right click your project-> properties -> build -> platform target : x86
64 bit app can only run on 64 machine while 32 bit app can run on both.

Running a Data Synapse Win32 DLL Grid Node on a Windows 64 Machine?

We are developing a Data Synapse calc node process in C# that requires functionality in a Win32 DLL. We have no problems building this.
The question is it has to run on a Windows 64 bit system, with Data Synapse 5.1 Grid APIs for Windows 64. While Windows 64 will run most processes transparently using WOW we don't know that Data Synapse's 64 bit will in some way stop this from working?
Anyone done this?
8 Jun 2009: Update.
when we try to run a win32 service on the win64 grid we run into problems because on Win64 the grid code intrastructure runs as 64 bit Java. This java calls our service using a win64 JINI call to our service which is implemented as a DLL. Unfortunately as a Win32 DLL.
Do you want your C# code to run as a .NET service? .NET Services run in-process and as far as I know, there is no way of mixing 32bit and 64bit code within a single process.
I see two solutions
1) Run 32bit DataSynapse engines OR
2) Run the C# code in a surrogate 32bit process. Use some form of IPC to communicate between some stub code running in the engine process and the surrogate process.
I believe this infrastructure has already been built by DataSynapse for C/C++ code and is called IsolateService. To use IsolateService a simple C->.NET bridge would need to be developed on the remote end or a .NET executable wrapper developed to host the .NET dll and handle COMs.
Nathan
Maybe you can install and run a win32 engine at the win64 machine, in that case everything is in WOW.
If you try to install a win32 engine on a win64 machine, make sure that your installed manager is ALSO USING a 32 bits JDK Java (look for the environment variable JAVA_HOME).
So, in order to have a 32-bit running on a 64-bit machine, you must have a 32-bit Java JDK, and the DataSynapse manager must have been installed pointing to the 32-bit Java machine (when installing the manager, the JAVA_HOME variable should be pointing to the 32-bit version).

Resources