mex file creation from 32 to 64 bits
이전 댓글 표시
Hi,
The mex files (mexw32) can be created smoothly on a 32bit machine. But I failed to create the same mex files on a 64 bit one. I should have all the relevant files or else it wouldn't work on a 32 bit machine.
Does anyone know if the obj or c files need to be edited differently for a 64 bits machine?
More specifically, I keep getting the following error.
affine_transform_3d_double.obj : error LNK2019: unresolved external symbol interpolate_3d_double_gray referenced in function transformvolume affine_transform_3d_double.mexw64 : fatal error LNK1120: 1 unresolved externals
C:\PROGRA~1\MATLAB\R2011B\BIN\MEX.PL: Error: Link of 'affine_transform_3d_double.mexw64' failed.
Thanks!! Stephen
답변 (2개)
Kaustubha Govind
2012년 9월 17일
1 개 추천
You do need to have all object/library files that you are linking against to also be of 64-bit architecture, so you need to re-compile them if you only have 32-bit versions.
Stephen Yip
2012년 9월 17일
0 개 추천
댓글 수: 3
James Tursa
2012년 9월 17일
No.
Walter Roberson
2012년 9월 17일
Though it depends on what the C does and has it is written. Some C code would simply need to be recompiled. Some would need to have some data types changed to avoid using more space than originally expected. Some code that interacted with the operating system would need to have minor changes to names of the routines that are called. But there are some kinds of code that need extensive changes.
I assume James meant that a mexw32 cannot be converted to a mexw64 file, while Walter explains, that a C-source, which compiles successfully for a 32-bit compiler need sometimes modifications to work with a 64-bit compiler also.
I confirm both. There is no simple way to convert C-code and no way at all to convert compiled libraries.
카테고리
도움말 센터 및 File Exchange에서 Write C Functions Callable from MATLAB (MEX Files)에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!