I succeded to compile and test the mex module for Windows 7 x64 (Sp1) linking with the multithreded OpenBlas. In this way one can take advantage of the multicore architecture of the available CPU. For the Windows operating system the process is rather convoluted and delicate (one can easily get into the so called "dll hell" problem). The solution is indeed based on creating a dll file. I got it working following a script from Roland, so many thanks to him who pioneered a way to compile using Cygwin and gracefully shared his own script.
The idea is the following:
1) install Openblas and add its lib folder to the $Path$ Environment variable.
2) install Cygwin64 (the Devel package)
3) make sure you have SDK 7.1 installed along with Visual Studio 10.0 (it's free) and all the updates for Win7.
4) add to the $Path$ environment variable "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64"
5) find and copy the x64 version of IESHIMS.dll into a folder added to $Path$ environment variable. (I know, this is counterintuitive and seems esoteric but if you don't it may not work) To check that this is needed one can use "Dependency Walker".
6) open the Cygwin64 terminal and go to the "lbfgsb3.0_mex1.2" folder and make sure the "Lbfgsb.3.0" subfolder with all its files is inside (if not download it).
7) Type (or creat a .sh script to run at once):
Could you please post detailed instructions for how to compile the lbfgsb_wrapper in Windows 7 64bit?
I was only able to compile in Linux and Mac OS X so far . I also linked with the OpenBlas library which is very fast ( if you have a multi-core cpu).