After installing Lapack libraries in CAE Linus 2013, I tried to run a fortran file calling Lapack subroutine with the help of '.sh' file in 'Geany'. My program exited with code 127. Please help!
Terminal Photo:
[Terminal photos][3]
Error Photo
Related
I'm new to Matlab and was trying to build a C file. The code gets compiled fine with gcc (4.8.4 in 64-bit Ubuntu). But when I try to build with mex, it shows following error:
error: exponent has no digits
I'm not sure what I'm doing wrong. The error is in this file. Complete error log is here.
When I compile the code using gcc, there are no errors. I do not provide any special arguments to gcc. To my knowledge, mex is using gcc so I do not understand why mex is failing to build the code.
I've little knowledge of C programming and any help is highly appreciated!
Edit:
To clarify more, I've got the source in two files:
File 1 has the C code with a main function, and uses functions from this
file (which mex can not build).
File 2 has the C code of the S-Function which call's File 1's main function. File 2 has an include statement to include File 1.
When I said I can build using gcc, I just built File 1 with this command: gcc file1.c -o file1. I think not building File 2 with gcc has no impact here in my question, as only File 1 uses those functions from the file which mex can not build.
I used this command from Matlab mex file2.c to build and got the error.
For C code, you probably need to enable GNU extensions for C99 (-std=gnu99). As described in my previous post on enabling C99, to pass this to mex:
mex -v -largeArrayDims CFLAGS="\$CFLAGS -std=gnu99" mexSouce.c
The reason the default does not work is because mex likes to choose the ANSI standard, which is often not the newest.
I am using 64bit MATLAB trial R2015b in Linux mint. I am trying to compile the CPU version of the library. When I try to configure compiler for mex using command
mex -v GCC='/usr/bin/gcc-4.7' timestwo.c
It shows me an error
In file included from /usr/local/MATLAB/R2015b/extern/include/mex.h:51:0,
from /home/tt/Desktop/practice/timestwo.c:1:
/usr/local/MATLAB/R2015b/extern/include/matrix.h:23:20: fatal error:
stdlib.h: No such file or directory
compilation terminated.
As it is not compiled. So,
cd /home/tt/Desktop/practice/matconvnet-1.0-beta14/matlab/
vl_compilenn
Error using mex
No supported compiler or SDK was found.
Error in vl_compilenn>mex_compile (line 438)
mex(mopts{:}) ;
Error in vl_compilenn (line 400)
mex_compile(opts, srcs{i}, toobj(bld_dir,srcs{i}), flags.mexcc) ;
Here is the situation:
Ubuntu 13.04, Matlab 2012a and Intel C++ Composer XE 2013 for Linux.
I downloaded a matlab code archive and followed the instructions in it to compile the .cpp files. Formerly when I finished installing Matlab 2012a and started it, some error messages showed up and I googled out an answer which is:
sudo ln -s /lib/x86_64-linux-gnu/libc.so.6 /lib64/libc.so.6
And then there came out another error message which told me 'missing lstdc++' when I started compiling, the idea of re-installing g++ first came into my mind, and the error message disappeared after I did so. However, finally I got an error which I could not find an answer anywhere:
>> compilemex
ld: cannot find -lguide
mex: link of ' "max_pool.mexa64"' failed.
Error using mex (line 206)
Unable to complete successfully.
Error in compilemex (line 20)
eval(exec_string{1});
During the the process of searching for a solution, I found a thread for my previous 'missing lstdc++' error which differed from what I did to fix it, does this matter or not? And another hint is that I could not find any file named like 'libguide' under the /opt/intel/ directory, how could I fix it?
Thanks in advance!
Googl'ing for libguide, i found this:
http://software.intel.com/en-us/forums/topic/284445
According to this, the build script you're using refers to an old version of the intel compiler. Newer versions seem to have the functions in libguide.so moved to libiomp5.so.
So try replacing -lguide by -liomp5.
Disclaimer: this is pure google knowledge. Personally I have no idea what either library is good for :)
I'm trying to make http://iridia.ulb.ac.be/~manuel/hypervolume (version 2.0) on windows using the instructions they've given in their README which is to install MINGW and run "make mex", however I keep getting this error:
$ make mex
mex -D VARIANT=4 Hypervolume_MEX.c hv.c
mex.exe: Invalid command-line option
mex.exe: Data: unknown option
make: *** [mex] Error 1
instructions given:
Guillaume Jacquenot contributed a MEX interface for MATLAB
(Hypervolume_MEX.c). Use make mex to compile it.
Any help would be appreciated thank you
Within matlab change directories to the location of the hypervolume code, then run
mex -DVARIANT=4 Hypervolume_MEX.c hv.c avl.c
at the matlab command prompt. If your c compiler is set up correctly within matlab this should generate an executable named Hypervolume_MEX.xxx (dll in my case).
edit
I used the matlab compiler (Lcc C 2.4) on Matlab 7. No luck with Visual Studio 6 or Watcom 10.6 compilers (although I did not attempt to debug).
I have Xcode(4.4.1) installed on my mac, and use MATLAB r2011a (64 bit) on the computer. I have ben trying to compile mex files, but I get the following error:
/Applications/MATLAB_R2011a.app/bin/mex: line 305: gcc-4.2: command not found
/Applications/MATLAB_R2011a.app/bin/mex: line 1041: gcc-4.2: command not found
mex: compile of ' "mdwt.c"' failed.
??? Error using ==> mex at 208
Unable to complete successfully.
Error in ==> compile at 39
mex mdwt.c mdwt_r.c
When I type in "gcc" at the command prompt (terminal) , I see that it has been installed.
Can anyone tell me how to fix this?
You might have to run mex -setup first to tell matlab which compiler is available.
Please check this link:
How to use/install gcc on Mac OS X 10.8 / Xcode 4.4
For xcode 4.4, I guess you need to install gcc manually by yourself.