- CODEBLOCKS COMPILER MATLAB MEX SETUP HOW TO
- CODEBLOCKS COMPILER MATLAB MEX SETUP INSTALL
- CODEBLOCKS COMPILER MATLAB MEX SETUP CODE
- CODEBLOCKS COMPILER MATLAB MEX SETUP WINDOWS
CODEBLOCKS COMPILER MATLAB MEX SETUP WINDOWS
To add to the woe, the windows compilers only support the C89 std (most recent is the C99 standard, yes, they've had 16 years to implement this, but haven't managed it yet). To actually compile anything with this, you have to launch a special command prompt which sets up some environment variables which must be present for the system to run, and cmake must also be run from this special prompt for it to be able to find the compilers to set up the build system. The default (free) compiler on windows, that is supported by Matlab, is the Windows SDK 7.1. However, for the Matlab mex files, which have to be linked to the libraries, and Matlab's own libraries, and everything compiled using the same compiler, there are a number of problems. For the binary files (fmesher.exe and fsolver.exe) I can just cross-compile from linux, which is no problem. The main reason is that the Windows environment is quite hostile to developers. I've been trying for a few days to find a good solution for Windows users, but it's difficult. Pps - I've also just attached the mex files created on a win7/8 64bit r2015a environment in case it helps anyone else. However, it appears to be a syntax error to do with plotting fields so not to do with XFEMM. Ps - Note that I think there may be a couple of errors in the femm_manual_tutorial_example.m as I too cannot get the script to run completely. I hope this helps you to create the required mex files for your setup. I've also tested the mex files on a Win8.1 machine (with the same setup as described above) as I didn't want to move my MATLAB installation. I sucessfully ran this on a Win7 64bit OS on MATLAB r2015a. This should then take a while and produce the required mex files with no error messages (other than a warning as per Richard's post below). Run mfemm_setup('ForceAllRecompile', true).Use gnumex to setup the GCC compiler that comes with mingw64.
CODEBLOCKS COMPILER MATLAB MEX SETUP INSTALL
CODEBLOCKS COMPILER MATLAB MEX SETUP HOW TO
I have been working on this for the last 2 weeks and am really out of further ideas on how to solve this problem. My GCC version is 4.9.2 and I am using Matlab 2014b. More specifically, if I open the fmesher.m file I notice that the command "mexfmesher(filename)" is what causes the crash.
CODEBLOCKS COMPILER MATLAB MEX SETUP CODE
My evidence for that is after 'mfemm_setup' finished it created a folder "xfemm_mex_files_for_win64" which contained 5 mex files.Ħ.) Now I go into the example code "femm_manual_tutorial_example.m" and run it the first half of the code runs but when it reaches line 273 and actaully calls on the mex function, my Matlab crashes. I verified that this indeed worked by running the example mex provided in the gnumex file.Ĥ.) Then I went into Codeblocks and compiled the mfemm_libs.workspace and the cfemm.workspace (inside C:/./mfemm/cfemm).ĥ.) Finally I ran mfemm_setup, which only out put a warning message, but still seemed to compile everything. Here are some steps of what I've done so far:ġ.) Downloaded XFEMM, gnumex, and a GCC compilerĢ.) ran gnumex so that matlab recognizes gccģ.) ran 'mex -setup' and chose a gcc compiler for Matlab to use. I have tried numerous steps to combat this issue but still can't seem to solve it. I've been trying to get XFEMM to work on a Win 7(64bit) machine and continuously have Matlab crash on me when I run the example code provided in the file.