Comments on: How to write a .dll file in Windows 32 bit and 64 bit and Compile in Matlab 32 bit and 64 bit and how to write a .so file in Ubuntu (Linux) and Compile in 64 bit Matlab https://www.toddmccollough.com/how-to-write-a-dll-file-in-windows-32-bit-64-bit-and-compile-in-matlab-and-how-to-write-a-so-file-in-ubuntu-linux-and-compile-in-matlab/ Todd McCollough's Website Thu, 15 Dec 2011 21:10:16 +0000 hourly 1 https://wordpress.org/?v=6.6.2 By: Dinu https://www.toddmccollough.com/how-to-write-a-dll-file-in-windows-32-bit-64-bit-and-compile-in-matlab-and-how-to-write-a-so-file-in-ubuntu-linux-and-compile-in-matlab/#comment-12 Thu, 15 Dec 2011 21:10:16 +0000 http://www.toddmccollough.com/?p=98#comment-12 Great Tutorial! Thanks a lot!

One small thing: before running loadlibrary(…), one should make sure the right compiler is selected: mex -setup

]]>
By: Todd McCollough https://www.toddmccollough.com/how-to-write-a-dll-file-in-windows-32-bit-64-bit-and-compile-in-matlab-and-how-to-write-a-so-file-in-ubuntu-linux-and-compile-in-matlab/#comment-11 Wed, 25 May 2011 04:29:58 +0000 http://www.toddmccollough.com/?p=98#comment-11 hmm not sure Nick, it worked as tested for the configurations indicated above. What version of Visual Studio are you using?

]]>
By: Nick https://www.toddmccollough.com/how-to-write-a-dll-file-in-windows-32-bit-64-bit-and-compile-in-matlab-and-how-to-write-a-so-file-in-ubuntu-linux-and-compile-in-matlab/#comment-10 Sun, 15 May 2011 00:26:52 +0000 http://www.toddmccollough.com/?p=98#comment-10 Hi,

I tried the Win64/Matlab64 example but when building the DLL I received the error: C1853: ‘x64\Release\test.pch’ precompiled header is from a previous version of the compiler, or the precompiled header is C++ and you are using it from C (or vice cersa)

I tried renaming test.cpp and it will build and loadlibrary in Matlab but not calllib, any ideas? thank you

]]>
By: guest https://www.toddmccollough.com/how-to-write-a-dll-file-in-windows-32-bit-64-bit-and-compile-in-matlab-and-how-to-write-a-so-file-in-ubuntu-linux-and-compile-in-matlab/#comment-9 Thu, 18 Nov 2010 15:49:00 +0000 http://www.toddmccollough.com/?p=98#comment-9 Oh Yes. 6 houre searching an dnow i have the answer. you are my new hero for today!
thanks soooooo much!

greetings

]]>
By: Todd McCollough https://www.toddmccollough.com/how-to-write-a-dll-file-in-windows-32-bit-64-bit-and-compile-in-matlab-and-how-to-write-a-so-file-in-ubuntu-linux-and-compile-in-matlab/#comment-8 Tue, 16 Nov 2010 18:18:06 +0000 http://www.toddmccollough.com/?p=98#comment-8 Hi Tobias,

I have seen that error before. You need to be very careful that you have followed all of the steps outlined above such as having Visual Studio 2008 Pro SP1 installed with the 64 bit compilers.

That error may be occurring because it is attempting to use a 32 bit compiler, but I can’t remember entirely.

I encourage you to visit the mathworks.com forums and read up on MATLAB documentation if you are still having difficulty.

]]>