Re: mex compile probem
- From: Christopher Hulbert <cchgroupmail@xxxxxxxxx>
- Date: Tue, 31 Jan 2006 11:41:06 -0500
dustin wrote:
> Hi, I'm running matlab 7 and trying a simple compilation on a linux
> cluster in my home directory.
>
> mex -v -V5 yprime.c
> produces this output
>
> mexopts.sh sourced from directory (DIR = $HOME/.matlab/$REL_VERSION)
> FILE = /fs/user1/u6/dth128/.matlab/R14/mexopts.sh
> ----------------------------------------------------------------
> -> MATLAB = /usr/local/matlab701
> -> CC = gcc
> -> CC flags:
> CFLAGS = -fPIC -ansi -D_GNU_SOURCE -pthread
> -fexceptions -m32
> CDEBUGFLAGS = -g
> COPTIMFLAGS = -O -DNDEBUG
> CLIBS =
> -Wl,--rpath-link,/usr/local/matlab701/bin/glnx86
> -L/usr/local/matlab701/bin/glnx86 -lmx -lmex -lmat -lm -lm -lstdc++
> arguments = -DV5_COMPAT
> -> CXX = g++
> -> CXX flags:
> CXXFLAGS = -fPIC -ansi -D_GNU_SOURCE -pthread
> CXXDEBUGFLAGS = -g
> CXXOPTIMFLAGS = -O -DNDEBUG
> CXXLIBS =
> -Wl,--rpath-link,/usr/local/matlab701/bin/glnx86
> -L/usr/local/matlab701/bin/glnx86 -lmx -lmex -lmat -lm -lm
> arguments = -DV5_COMPAT
> -> FC = g77
> -> FC flags:
> FFLAGS = -fPIC -fexceptions
> FDEBUGFLAGS = -g
> FOPTIMFLAGS = -O
> FLIBS =
> -Wl,--rpath-link,/usr/local/matlab701/bin/glnx86
> -L/usr/local/matlab701/bin/glnx86 -lmx -lmex -lmat -lm -lm -lstdc++
> arguments =
> -> LD = gcc
> -> Link flags:
> LDFLAGS = -pthread -shared -m32
> -Wl,--version-script,/usr/local/matlab701/extern/lib/glnx86/mexFunctio
> n.map
> LDDEBUGFLAGS = -g
> LDOPTIMFLAGS = -O
> LDEXTENSION = .mexglx
> arguments =
> -> LDCXX =
> -> Link flags:
> LDCXXFLAGS =
> LDCXXDEBUGFLAGS =
> LDCXXOPTIMFLAGS =
> LDCXXEXTENSION =
> arguments =
> ----------------------------------------------------------------
>
> -> gcc -c -I/usr/local/matlab701/extern/include
> -I/usr/local/matlab701/simulink/include -DMATLAB_MEX_FILE -fPIC -ansi
> -D_GNU_SOURCE -pthread -fexceptions -m32 -DV5_COMPAT -O -DNDEBUG
> yprime.c
>
> cc1: Invalid option `32'
>
> mex: compile of 'yprime.c' failed.
>
> ??? Error using ==> mex
> Unable to complete successfully
>
> Does anyone have any idea how to make this compile properly. I'm new
> to mex and to compiling C code. I downloaded some software that
> needed compilation and it's really holding me up.
>
> Thanks a lot,
> Dustin
Obviously your GCC does not support the -m32 option. If it's an older version,
perhaps upgrading it would support -m32? Other than that, edit your mexopts.sh
and remove the -m32 flags.
In case you weren't sure your mexopts file should be:
/fs/user1/u6/dth128/.matlab/R14/mexopts.sh
.
- References:
- mex compile probem
- From: dustin
- mex compile probem
- Prev by Date: Matlab no response after running commdoc_gray.m
- Next by Date: mex compile probem
- Previous by thread: mex compile probem
- Next by thread: Warning: Overriding parameters of '.../Selector' which is inside a library link.
- Index(es):
Relevant Pages
|