mex a statisc library error
Show older comments
please help me:when I run
mex enkfgoesrtv.f90 -I/sat7/jzhang/GOES/crtm-2.05_clear/include/ -L/sat7/jzhang/GOES/crtm-2.05_clear/lib -lCRTM
error information:
/usr/bin/ld: /sat7/jzhang/GOES/crtm-2.05_clear/lib/libCRTM.a(crtm_clear.o): relocation R_X86_64_32S against `crtm_clear_$BLK.var$3218' can not be used when making a shared object; recompile with -fPIC /sat7/jzhang/GOES/crtm-2.05_clear/lib/libCRTM.a: could not read symbols: Bad value collect2: ld returned 1 exit status
mex: link of ' "enkfgoesrtv.mexa64"' failed.
??? Error using ==> mex at 208 Unable to complete successfully.
Answers (1)
Kaustubha Govind
on 5 Nov 2012
0 votes
MEX-files are essentially shared libraries with a MEX-specific extensions. All shared libraries on Linux can only be linked against other libraries that have been compiled with the -fPIC option. See HOWTO fix -fPIC errors for more information.
Categories
Find more on MATLAB Compiler in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!