Unable to use mex on R2010a - visual-studio-2010

I'm using Matlab R2010a. I need to create a custom block embedded with my code for which i require mex. I have Visual Studio Express 2010 installed on my system. I followed the instructions and installed the mex patch for R2010a into the matlabroot folder using the unzip command. I also installed Windows SDK 7.1 64 bit as recommended. However when i type mex -setup no compiler is shown. Any alternative solutions?

Is your matlab 64Bits? I don't think it supports mex (or there is some problems. I don't remember). I had this problem and switched to a newer version.

Related

How to compile mex file in matlab 2014a, visual studio 2017 and win10?

I'm trying to compile a mex file using MATLAB 2014a. It returns an error No compiler found and I try mex -setup but it cannot find any compiler while I have installed `Visual Studio 2017'.
I'm using Win10 and I don't know how to fix this!
You are using a version of MATLAB that isn't supported on your OS (it is supported up to Windows 8.1), and a version of MSVC that didn't exist when it was released (it only recognizes MSVC versions 2008-2013).
However, it is supposed to have lcc-win32 bundled with it, which is a simple C compiler, and should be found by mex -setup.
If you want to compile C++ MEX-files, you will need to find MSVC 2013 or upgrade your version of MATLAB (highly recommended at this point).
Have you check whether your system is compatible or supported each other?
You may refer here https://www.mathworks.com/support/compilers.html

Compile OpenCV 3.4 and Cuda 9.2 with MS VS15 2017

I need to do fast image processing so I decide to go for OpenCV with CUDA support. Now I'm trying to build OpenCV as dll to use it in my project, but I am not even able to generate the VS project since CMake keeps giving me this error:
CMakeError. I am on Windows 10, CMake 3.11 with VS 15 2017 x64 generator, OpenCV 3.4 (the last release).
I have installed CUDA 9.2, 9.1 and 8.0 and set CUDA_HOME environment variable as the CUDA toolkit directory. Nothing seems to work.
Then I try to set the CUDA_SDK_ROOT_DIR through the CMake GUI, but the CUDA toolkit directory seems to be not the right one and I'm not able to find the CUDA sample directory anywhere.
I have googled a lot, but I found nothing that had been able to help me. Did someone face this very same issue? How can I solve it?
PS: I have successfully created the dll with TBB and IPP (without CUDA) and it is still not fast enough, so I really need to use Cuda.
I have solved using Cuda 9.1 and VS 15.45. To install CUDA in a correct way you need to use custom installation and delete the VS integration, since it seems to have some problems. Once installation is complete, CMake should detect it.
This is a guide that could help.

dll Dependency unwanted with visual studio 2010

I am using visual studio 2010.
Before starting my project, I installed cuda SDK 4.2.
After that, I installed opencv 2.4.2. In my project, I'm using only opencv and it works correctly. However, when I try to run my program on another computer it tells me that cuda dll (like cudart32_42_9.dll, npp32_42_9.dll and nvcuda.dll) are needed. I don't use at all cuda and do no reference in my project property to cuda. I would like to know how to remove those dependency. I don't understand why visual studio add dll I don't use.
The pre-built OpenCV 2.2 onwards, comes with 2 versions of the binaries (dlls).
The dlls in the \build\gpu directory are the superset and are built with CUDA support. Therefore, to use them you require the CUDA Runtime dlls (cudart, npp etc). These binaries are required if you want to use the GPU functionality of OpenCV. These may also be used to check if you have a GPU present in your system or not.
The other version of dlls which are present in the x86 or x64 folder in the build directory of OpenCV, are built without CUDA support (although a gpu dll is also present in that directory). You don't need cuda dlls to use these binaries.
Both of these versions are built with Intel Thread Building Blocks support, and so require tbb_debug.dll and tbb.dll for Debug and Release configurations respectively. So if you use the CPU functions of OpenCV, they will be TBB Accelerated.

Node.js native extensions on Windows

I compiled the version v0.5.9 of node.js (I know, is unstable) using Visual Studio 2010 and I obtained node.exe to Windows 7. Now, I wrote the Hello World example (https://www.cloudkick.com/blog/2010/aug/23/writing-nodejs-native-extensions/) of the native extension use the same VS 2010 compiler on a dll file. Then, How I can "link" this dll with the node.exe? I know that in linux, the node-waf building tool is used but I don't know what I have to use to link them on Windows.
In my implementation, I can't use Cygwin or linux...is under Windows.
p.d.: I'm trying to create an OpenGL engine based on offscreen rendering (not WebGL)

What is the best way to build open source libraries DLLs for Windows developers to use?

I have several C free software/open source libraries that I develop on Linux and OSX with the GNU toolchain (automake, conf, flex, bison, gcc, ...) but I occasionally get requests to provide Windows DLLs. I'd like to be able to provide those without having to spend a lot of time and money with Windows Visual Studio development. I do have a Windows XP virtual machine available and I also know the software is portable as occasionally I get patches to make it build in on windows.
What approaches or tools should I be using? Cross compiling on Linux? using Visual Studio Express or something else? I would prefer something that is fully automated from a SVN repository. I do not count cygwin as a solution since that does not seem to provide what Windows developers need, as far I understand the issues - linking and DLLs.
You can try Mingw with MSYS, Visual Studio (Express) with SUA (subsystem for unix application) or Cygwin to compile programs that are automake/autoconf based (./configure && make to build under linux).
Unfortunately usually the lib file they create is not compatible with other compilers, so if you want your library to work with an application that is developed using Visual Studio, then you should use the VSC++ approach. Usually a lot of GNU projects (check gnuwin32) actually have VC compatible build scripts too, than can be compiled using "nmake"
You could use MinGW or install the MSVC command line tools from Visual Studio Express.
Either of those can be driven by command line scripts.
I imagine a cross compile from Linux would also work, but I have no idea how easy (or painful) that might be to get going.
This short article shows a simple cross compile of a Windows application & running that app under Wine:
http://www.linuxjournal.com/node/1005753
The Windows Software Development Kit includes Microsoft's C/C++ compiler (command line only with no visual tools), so you don't even need Visual C++ Express Edition. The Windows SDK is a free download from Microsoft.
If you're using http://www.cmake.org/, cmake can create the Makefile (for Unix) and project file (for Visual Studio). This is what for example the KDE project is using.
Visual Studio's compiler can be started from a Windows command line with 'devenv /build debug project.csproj' on the cmake generated file. This does however require a Windows (possibly in a VM) with a (potentialy free) Visual Studio installed.

Resources